Pro plan from £5 per endpoint per month · see pricing
Secronyx
AvailableLinuxWindowsmacOS

Prometheus

See which scrape targets are down and why, what is firing, which rules fail to evaluate and what fills the TSDB, through read-only requests to the HTTP API.

What it answers

Questions an on-call engineer asks, which an AI client can answer with this plugin.

  • Which scrape targets are down, and what was the last scrape error?
  • Which alerts are firing or pending, and since when?
  • Which recording or alerting rules fail to evaluate, and with what error?
  • Which metric or label has the most series in the TSDB head?
  • Did the last config reload succeed, and how long is data kept?

What it returns

Each of the plugin's read-only tools, described in words.

  • Prometheus scrape targets with their health (up, down or unknown), job, instance, the last scrape error, when it was last scraped and how long the scrape took
  • Active Prometheus alerts with their name, state (pending or firing), severity, job and instance labels, when they became active and the value that triggered them
  • Prometheus recording and alerting rules with their health (ok, err or unknown), the last evaluation error, the normalised expression, alert state and how long the last evaluation took
  • Prometheus TSDB head in one row - series, label pairs, chunks and time range, and the metrics with the most series and the labels with the most values or memory
  • Prometheus runtime in one row - start time, whether the last config reload worked and when, TSDB corruptions, storage retention, goroutines and Go memory settings

At a glance

Plugin
prometheus 1.0.0
Publisher
levantar
Platforms
Linux, Windows, macOS

Tested on

  • Prometheus 2.54.1, 3.0.1, 3.5.5 and 3.15.1 on Linux (Ubuntu, Docker), CI runner
  • Prometheus 3.15.1 on macOS (official release), CI runner
  • Prometheus 3.15.1 on Windows Server (official release), CI runner

How it logs in

Without an explicit choice, install tries the methods that need no secret first, in this order.

  • No login (a local endpoint)
  • A user name and password
  • A bearer token
  • A client certificate

The least-privilege login

The setup file in the pack. secronyx plugin setup prometheus prints it; an administrator applies it by hand.

# The least-privilege login for the prometheus plugin. Prometheus has no # users or roles of its own: every login that reaches its HTTP API can do # whatever the server's flags turn on. So the least privilege is a # read-only login on a server that turns nothing else on: # # 1. Keep --web.enable-admin-api and --web.enable-lifecycle off. With # either on, any login can delete series or shut Prometheus down, and # the plugin's privilege check refuses the login. # 2. On a server that is not protected, use auth none from this host: the # plugin calls the API on localhost only. # 3. To protect it natively, add the login to the web config file that # Prometheus reads with --web.config.file, with a bcrypt hash of its # password (htpasswd -nbBC 10 '' '<password>' | tr -d ':\n'), and # install with --auth password: basic_auth_users: {{user}}: <bcrypt hash of the password> # 4. Behind a reverse proxy (bearer token or client certificate), give the # login GET only, on these paths: # /api/v1/targets /api/v1/alerts /api/v1/rules # /api/v1/status/tsdb /api/v1/status/runtimeinfo # /api/v1/status/flags (the privilege check)

See it run

Recording coming. Install, setup and status runs for this plugin are recorded on the shared test lab, and appear here once they have run.

Read-only, in layers

Every request is a GET or HEAD to the endpoint the operator configured, on a path fixed in the signed pack. Redirects are not followed, and requests known to change state are refused.

These controls narrow what the plugin can do; none of them is a guarantee on its own. An administrator can still accept a more powerful login on purpose (audited and shown in status), root or Administrator on the host can replace the agent, and the plugin can read whatever its login can see.