Grafana
The Grafana provider brings Grafana Alerting’s alerts into AVACOM, by a contact point that posts to AVACOM or by pulling. It can also build the service topology from Tempo’s service-graph metrics.
What the bank provides
Section titled “What the bank provides”| What | Details |
|---|---|
| Address | Grafana’s URL, e.g. https://grafana.bank.internal |
| Credentials | A service account token. alert.rules:read is required, to pull alerts. alert.provisioning:read and alert.provisioning:write (in Grafana’s Admin role by default) let AVACOM create its contact point and notification policy itself |
| Network | AVACOM reaches Grafana’s HTTPS port. For pushed alerts, Grafana reaches AVACOM’s /alerts/event/grafana |
| 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 |
Connect
Section titled “Connect”-
In Grafana, under Administration > Service accounts, create a service account with the permissions above and add a token.
-
In AVACOM, open Providers, choose Grafana and fill in:
Field Value Token The service account token ( glsa_…)Grafana host The address above Datasource UID Only for the topology: the Prometheus datasource that holds traces_service_graph_request_totalVerify TLS certificates On -
Tick Install Webhook to have AVACOM create the contact point and policy, or turn on Pulling Enabled.
-
Press Connect.
Metrics and logs as evidence
Section titled “Metrics and logs as evidence”When an incident is analyzed, AVACOM asks Grafana’s datasources about the incident’s hosts and services
through /api/ds/query, with the same token:
| Datasource | What AVACOM asks for | Matched by |
|---|---|---|
| Prometheus | The metrics on the Prometheus page, or your own PromQL | Labels instance (host) and job (service) |
| Loki | The log lines of those hosts and services in the analysis window | Labels host and service_name |
Prometheus datasource UID and Loki datasource UID choose the datasources. Left empty, AVACOM uses the first of each type, which needs a token that may list datasources. The label fields change which labels name a host or a service. Records appear on the Root cause tab as prometheus and loki, from Grafana.
Service topology
Section titled “Service topology”AVACOM reads Tempo’s service graph, traces_service_graph_request_total and its companions, from the Prometheus
datasource in Datasource UID. When that is empty, it uses the datasource that Grafana’s Tempo datasource names
for its service map. Each pull then fills the Service Topology.
Webhook by hand
Section titled “Webhook by hand”If the token cannot write provisioning, set the contact point up by hand: the provider’s page shows the steps, with
AVACOM’s address and the X-API-KEY header to add.