Configuring the Prometheus dashboard#

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

  1. Using the the Prometheus module, add the following include directive in the http block of the configuration file:

    http {
        include prometheus_all.conf;
    
        # ...
    }
    

    And a respective prometheus directive inside the location within a separate server block that uses a designated IP address and port combination, for instance:

    server {
    
        listen 192.168.1.100:80;
    
        location =/p8s {
            prometheus all;
        }
    
        # ...
    
    }
    

    They enable the export of Angie metrics in Prometheus format at the endpoint specified by location.

  2. Add the following configuration to Prometheus, specifying the IP address and port set earlier under server:

    scrape_configs:
      - job_name: "angie"
        scrape_interval: 15s
        metrics_path: "/p8s"
        static_configs:
          - targets: ["192.168.1.100:80"]
    

    It collects metrics every 15 seconds, utilizing the /p8s path configured at the previous step.

    Note

    Make sure the global scrape_interval value is not larger that the value here.

  3. Import the Prometheus dashboard for Angie to Grafana.