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 → Plugins → prometheus, or YAML.
What lands in inventory
Each active target becomes a resource. Type is inferred from job/labels (hostname, port, exporter name):
| Typical target | resource_type | Example provider_resource_id |
|---|---|---|
| node_exporter / host | server | host:{ipv4} or node:{hostname} |
| postgres / mysql / redis | database | from job/instance labels |
| nginx / haproxy / traefik | load_balancer | scrape URL / instance |
| blackbox / FQDN probe | domain | hostname |
| other processes / VMs | instance | instance label |
Several targets on one IP collapse in the agent into one server (host:{ip}) when IPv4 is present. domain subdomains are grouped by apex in the console.
provider is always prometheus. Several Prometheus servers = different provider_account.
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 |
| Duplicates with Proxmox | different provider is expected; merge in the console |