Configuring the Prometheus dashboard#
To configure the Prometheus dashboard for Angie in Grafana, follow these steps:
Using the Prometheus module, add the following include directive in the
http
block of the configuration file:http { include prometheus_all.conf; # ... }
Also add the corresponding prometheus directive inside a
location
within a separateserver
block 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
.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
/p8s
path configured in the previous step.Note
Make sure the global
scrape_interval
value does not exceed the value specified here.Import the Prometheus dashboard for Angie into Grafana.