On Tue, Apr 21, 2020 at 8:20 AM Yagyansh S. Kumar <[email protected]>
wrote:
> Hi. I am using HAPROXY for configuring my LB-Rules and using HAPROXY
> Exporter to get the metrics. Now, majorly I want to keep track of the
> Requests coming to my LB and the responses served by my LB that is
> configured on the HAPROXY.
>
> Now,
> haproxy_frontend_http_requests_total
> haproxy_frontend_http_responses_total
> haproxy_backend_http_responses_total
>
> All these give me the cumulative numbers right from when the HAPROXY
> Exporter started scraping the metrics. I want to get the numbers for
> specific time interval like last 24hours, 2 days etc. Can someone help here?
>
HAProxy does not output historic data about past requests (nor would
Prometheus be able to scrape it), so you'd have to scrape the HAProxy
exporter for 24h, 2 days, etc., to get that amount of history into
Prometheus.
Then you can query for e.g. the average request rate per second over 24h
("rate(haproxy_frontend_http_requests_total[1d]") or the total number of
requests happening in 2d
("increase(haproxy_frontend_http_requests_total[2d])").
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/CA%2BT6YozghKZHyUNo6BmMdy8-jXAyHQO5gpFY7%3DvRFZ6Ne99rCA%40mail.gmail.com.