Skip to main content
Technical Preview

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. Public demo.promlabs.com and prometheus.demo.prometheus.io allow anonymous PromQL reads, but they do not expose a writable Pushgateway — status remains blocked until a Pushgateway (and preferably owned stack) smoke succeeds.

Basic Syntax

Events

Auth

None (default):
  1. Most Prometheus installs expose /api/v1/* without auth on private networks.
  2. Leave Authorization headers off for Queryinstant / Queryrange / Listtargets.
Bearer via reverse proxy (optional):
  1. Terminate TLS + auth in nginx / Traefik / similar in front of Prometheus / Alertmanager / Pushgateway.
  2. Pass token on the MQTT request payload:
    • Authorization: Bearer {value.json.token}
  3. Store the token in Hub secrets / GET SECRET "PROMETHEUS_TOKEN". Never commit real credentials.
Basic via reverse proxy (optional):
  1. Configure WITH USERNAME / WITH PASSWORD GET SECRET "PROMETHEUS_PASSWORD" on REST_API_CONFIG.
  2. Remove any Bearer headers from events.

Install

  1. Copy PrometheusRestApi.lot into your broker examples / connectors folder (no ADD METADATA in the deployable file).
  2. Set BASE_ADDRESS to your Prometheus URL (use https://… and WITH USE_SSL "true" when TLS terminates on the API host or proxy).
  3. -addRoute the file (or paste into Hub).
  4. For Pushgateway and Alertmanager, either change BASE and re-deploy, or keep separate connector copies with the matching BASE.
  5. Subscribe to the /response topics; publish JSON to the request topics.
Hub template listing uses hub-metadata.lot (WITH STATUS "beta", icon, doclink) — keep that file separate from the deployable connector.

Example payloads

Instant query
Range query
List targets
Pushgateway push — MQTT JSON must supply job; body {payload} is raw text/plain exposition (example metrics body):
List Alertmanager alerts (BASE = Alertmanager)

Complementary surfaces (not client events here)

References

Suggested branches (Hugo pushes)

  • App package: feat/rest-api-route-prometheus-alertmanager-and-pushgateway
  • Docs: feat/docs-rest-api-prometheus-alertmanager-and-pushgateway
Last modified on October 21, 2026