nic-6443 opened a new issue #5194:
URL: https://github.com/apache/apisix/issues/5194


   ### Improved or typo fixed.
   
   Now the sample configuration of prometheus job is as follows:
   ```yaml
   scrape_configs:
     - job_name: "apisix"
       metrics_path: "/apisix/prometheus/metrics"
       static_configs:
         - targets: ["127.0.0.1:9091"]
   ```
   Such a configuration will inherit the `scrape_interval` in the global 
configuration of prometheus.
   At the same time, the minimum time window of the `rate` function in the 
grafana dashboard provided is 30s.
   `sum(rate(apisix_bandwidth{instance=~"$instance"}[30s])) by (type)`
   Based on the above two points, if the `scrape_interval` in the user's 
prometheus global configuration is greater than 15s, the `rate` function may 
not calculate the result at some point in time, causing the dashboard to be 
unavailable.
   
   ### Solution
   
   Specify `scrape_interval` in the sample configuration
   ```yaml
   scrape_configs:
     - job_name: "apisix"
       scrape_interval: 15s
       metrics_path: "/apisix/prometheus/metrics"
       static_configs:
         - targets: ["127.0.0.1:9091"]
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to