Skip to content

Prometheus

The Prometheus provider connects in both directions:

  • Alerts in. AVACOM pulls firing and pending alerts from Prometheus, or Alertmanager pushes them by webhook.
  • Evidence out. When an incident is analyzed, AVACOM asks Prometheus for its metrics about the incident’s hosts and services over the analysis window, and the correlation can place them in a cause chain.
What Details
Address The Prometheus API, e.g. https://prometheus.bank.internal:9090. Thanos Query, Mimir, Cortex and VictoriaMetrics work too: give the address where /api/v1/query_range is answered
Credentials None, a user and password (basic auth), or a bearer token, depending on what sits in front of Prometheus. Read access is enough; AVACOM never writes
Network AVACOM reaches Prometheus on its HTTPS port. For pushed alerts, Alertmanager reaches AVACOM’s /alerts/event/prometheus
TLS A certificate from the bank’s CA: add the CA to the AVACOM host’s trust store, or set REQUESTS_CA_BUNDLE to it. Verify SSL certificates off is for test instances only
  1. In AVACOM, open Providers, choose Prometheus and fill in:

    Field Value
    Prometheus server URL The address above
    Prometheus username, password For basic auth; leave empty otherwise
    Bearer token For a token instead; not together with a username and password
    Label that names a host Default instance. An incident’s host db-core-01 matches db-core-01, db-core-01:9100 and db-core-01.bank.local:9100
    Label that names a service Default job
    PromQL for RCA evidence Leave empty for the default set below
  2. Turn on Pulling Enabled to have AVACOM read Prometheus’ alerts, or set up Alertmanager below.

  3. Press Connect. AVACOM reads /api/v1/alerts to check the address and the credentials.

Add a receiver to Alertmanager’s configuration, with the address and key the provider’s page shows:

route:
receiver: avacom
group_by: ["alertname"]
receivers:
- name: avacom
webhook_configs:
- url: "https://avacom.bank.internal/alerts/event/prometheus?provider_id=<id>"
send_resolved: true
http_config:
basic_auth:
username: api_key
password: <AVACOM API key>

Each alert has the fingerprint Alertmanager gives it. AVACOM computes the same fingerprint for an alert it pulls, so one alert seen both ways is one alert in AVACOM, and the same alert on two hosts stays two alerts. Pending alerts come in as pending, not firing.

For the incident’s hosts and services, AVACOM runs these queries over the analysis window (about 60 points per series) and adds each point as a performance record, with a threshold where one makes sense:

Metric From Threshold
up up –
cpu.used_pct node_cpu_seconds_total (node-exporter) 90 %
memory.used_pct node_memory_MemAvailable_bytes, node_memory_MemTotal_bytes 90 %
filesystem.used_pct{mountpoint=…} node_filesystem_avail_bytes, node_filesystem_size_bytes 90 %
disk.busy_pct node_disk_io_time_seconds_total 90 %
network.errors_per_s node_network_receive_errs_total, node_network_transmit_errs_total –
http.latency_p95_ms http_request_duration_seconds_bucket –
http.error_pct http_requests_total (5xx share) 5 %

A query whose metrics the server does not have returns nothing and is skipped. The records appear on the Root cause tab as Prometheus. When there are many series, each one is thinned evenly to fit the analysis’ record limit, so no series loses its first or last point.

To ask for other metrics, put a JSON list in PromQL for RCA evidence. Write $selector where the label matcher goes; AVACOM replaces it with the host or service matcher:

[
{"metric": "mq.depth", "unit": "", "threshold": 1000, "query": "max by (instance, job) (ibmmq_queue_depth{$selector})"},
{"metric": "db.commit_time_ms", "unit": "ms", "threshold": 50, "query": "1000 * pg_commit_seconds{$selector}"}
]

Leave instance and job (or the labels you chose) in the result. Any other label in a result, such as mountpoint, becomes part of the metric’s name.

If Tempo’s metrics generator or the OpenTelemetry Collector’s servicegraph connector writes traces_service_graph_request_total to this Prometheus, each pull also fills the Service Topology. Every client and server pair becomes a dependency, labelled with its request rate, mean latency and failure share over the last hour. Without those metrics the topology is left as it is.