Prometheus
Status: available · package wg-flow-plugin-prometheus · provider prometheus · category monitoring.
The plugin reads the Prometheus HTTP API (/api/v1/targets) and turns scrape targets into inventory resources. It does not ingest metrics: WaveGrid gets identity and labels, not timeseries.
Install
docker compose exec agent wg-flow-agent plugin install prometheus
# or
wg-flow-agent plugin install prometheusThen the local UI → Connections → prometheus, or YAML.
What lands in inventory
The plugin does not mirror all of Prometheus service discovery into the CMDB. Only durable entities land in inventory: hosts and domains. Sidecar exporters, container IPs, and jobs like gitlab-ci / traefik / postgres-exporter are not resources — otherwise Docker restarts flood the catalog.
| Typical target | resource_type | Example provider_resource_id |
|---|---|---|
| node_exporter / windows_exporter / snmp | server | host:{ipv4} or node:{hostname} |
| blackbox ICMP/TCP against a host | server | same host, collapsed with node-exporter |
| blackbox HTTP/ICMP against an FQDN | domain | hostname |
cadvisor, gitlab-ci, traefik, kafka-exporter, postgres-exporter, arbitrary :8080 | — | not emitted |
Several host targets on one IP collapse in the agent into one server (host:{ip}). domain subdomains are grouped by apex in the console.
provider is always prometheus. Several Prometheus servers = different provider_account. After upgrading the plugin to 0.2.0, a sync marks former sidecar rows is_active=false and they stay out of the catalog.
YAML
plugins:
prometheus:
enabled: true
sources:
- id: prod
provider_account: "prom-prod"
sync_interval_seconds: 300
url: "https://prometheus.example.com"
auth_type: bearer
token: "…"
verify_tls: trueSource fields
| Field | Required | Description |
|---|---|---|
id | yes | Key in logs (prometheus/prod) |
provider_account | yes | Account label in inventory |
url | yes | Prometheus base without /api/v1 |
auth_type | no | none, bearer, basic |
token | if bearer | Bearer token |
username / password | if basic | HTTP Basic |
verify_tls | no | HTTPS certificate check |
sync_interval_seconds | no | Minimum 300 |
The agent calls {url}/api/v1/targets. If Prometheus sits behind a reverse-proxy prefix, include that prefix in url.
Check
wg-flow-agent status
wg-flow-agent dry-runJSON should contain provider: prometheus. In the console, filter provider Prometheus. Domains: Domains tab (apex groups).
Common errors
| Symptom | Check |
|---|---|
| 401 / 403 | auth_type and token; Prometheus ACL |
| Connection refused | URL from the agent host, not the container's localhost if Prom is outside |
| Empty list | targets unknown / nothing discovered; sidecar jobs (gitlab-ci, cadvisor) are intentionally omitted |
| No Traefik/Postgres as their own rows | intended in 0.2.0 — scrape, not a host; machines still come from node-exporter |
| Duplicates with Proxmox | different provider is expected; merge in the console |