Overview
A client-mode connector for a curated observability / ITSM slice of the Prometheus HTTP API, Pushgateway, and Alertmanager API:
Default
BASE_ADDRESS is http://prometheus.example.com:9090 (replace with your Prometheus host). Topics use itsm/prometheus/<object>/<verb>.
Prometheus, Alertmanager, and Pushgateway are usually separate hosts/ports (
:9090 / :9093 / :9091). Point BASE_ADDRESS at the matching host for each event, or deploy separate connector copies. For HTTPS reverse proxies set WITH USE_SSL "true". Do not put a trailing slash on BASE_ADDRESS.Prefer Hub secrets when a reverse proxy requires Basic or Bearer.
Basic Syntax
Events
Auth
None (default):- Most Prometheus installs expose
/api/v1/*without auth on private networks. - Leave Authorization headers off for Queryinstant / Queryrange / Listtargets.
- Terminate TLS + auth in nginx / Traefik / similar in front of Prometheus / Alertmanager / Pushgateway.
- Pass
tokenon the MQTT request payload:Authorization: Bearer {value.json.token}
- Store the token in Hub secrets /
GET SECRET "PROMETHEUS_TOKEN". Never commit real credentials.
- Configure
WITH USERNAME/WITH PASSWORD GET SECRET "PROMETHEUS_PASSWORD"onREST_API_CONFIG. - Remove any Bearer headers from events.
Install
- Copy
PrometheusRestApi.lotinto your broker examples / connectors folder (noADD METADATAin the deployable file). - Set
BASE_ADDRESSto your Prometheus URL (usehttps://…andWITH USE_SSL "true"when TLS terminates on the API host or proxy). -addConnectorthe file (or paste into Hub).- For Pushgateway and Alertmanager, either change BASE and re-deploy, or keep separate connector copies with the matching BASE.
- Subscribe to the
/responsetopics; publish JSON to the request topics.
hub-metadata.lot (WITH STATUS "beta", icon, doclink) — keep that file separate from the deployable connector.
Example payloads
Instant queryjob; body {payload} is raw text/plain exposition (example metrics body):

