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.conf takes values from /status/.

To configure the dashboard for Angie in Grafana, follow these steps:

  1. 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 separate server 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. The all template from prometheus_all.conf reads its values from the /status/ tree of the API module inside Angie, so the configuration needs no location with the api directive.

  2. 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.

  3. Import the dashboard for Angie into Grafana.