Configuring the Grafana Dashboard#
The official Angie dashboard for Grafana visualizes the metrics that Angie exports through the Prometheus module and a Prometheus server scrapes.
Related modules
Prometheus module: publishes the metrics the dashboard shows.
API module:
prometheus_all.conftakes values from/status/.
To configure the dashboard for Angie in Grafana, follow these steps:
Using the Prometheus module, add the following include directive in the
httpblock of the configuration file:http { include prometheus_all.conf; # ... }
Also add the corresponding prometheus directive inside a
locationwithin a separateserverblock with a dedicated IP address and port for this purpose, for example:server { listen 192.168.1.100:80; location =/p8s { prometheus all; } # ... }
These enable the export of Angie metrics in Prometheus format at the endpoint specified in the
location. Thealltemplate fromprometheus_all.confreads its values from the/status/tree of the API module inside Angie, so the configuration needs nolocationwith the api directive.Add the following configuration to Prometheus, specifying the IP address and port set earlier in the
server:scrape_configs: - job_name: "angie" scrape_interval: 15s metrics_path: "/p8s" static_configs: - targets: ["192.168.1.100:80"]
This will collect metrics every 15 seconds, using the
/p8spath configured in the previous step.Note
Make sure the global
scrape_intervalvalue does not exceed the value specified here.Import the dashboard for Angie into Grafana.