Skip to content

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 ​

bash
docker compose exec agent wg-flow-agent plugin install prometheus
# or
wg-flow-agent plugin install prometheus

Then 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 targetresource_typeExample provider_resource_id
node_exporter / windows_exporter / snmpserverhost:{ipv4} or node:{hostname}
blackbox ICMP/TCP against a hostserversame host, collapsed with node-exporter
blackbox HTTP/ICMP against an FQDNdomainhostname
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 ​

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: true

Source fields ​

FieldRequiredDescription
idyesKey in logs (prometheus/prod)
provider_accountyesAccount label in inventory
urlyesPrometheus base without /api/v1
auth_typenonone, bearer, basic
tokenif bearerBearer token
username / passwordif basicHTTP Basic
verify_tlsnoHTTPS certificate check
sync_interval_secondsnoMinimum 300

The agent calls {url}/api/v1/targets. If Prometheus sits behind a reverse-proxy prefix, include that prefix in url.

Check ​

bash
wg-flow-agent status
wg-flow-agent dry-run

JSON should contain provider: prometheus. In the console, filter provider Prometheus. Domains: Domains tab (apex groups).

Common errors ​

SymptomCheck
401 / 403auth_type and token; Prometheus ACL
Connection refusedURL from the agent host, not the container's localhost if Prom is outside
Empty listtargets unknown / nothing discovered; sidecar jobs (gitlab-ci, cadvisor) are intentionally omitted
No Traefik/Postgres as their own rowsintended in 0.2.0 — scrape, not a host; machines still come from node-exporter
Duplicates with Proxmoxdifferent provider is expected; merge in the console