mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-27 06:29:42 -08:00
f08abdb48b
irate is a rate function that only looks at the most recent two data points, and calucaltes a per-second value from that. This produces much more granular graphs for fast moving data, and works sanely across many scrape intervals. It doesn't do so well for slowly moving data.
30 lines
1.5 KiB
HTML
30 lines
1.5 KiB
HTML
{{ template "head" . }}
|
|
|
|
{{ template "prom_content_head" . }}
|
|
<h1>HAProxy Backends</h1>
|
|
|
|
<table class="table table-condensed table-striped table-bordered" style="width: 0%">
|
|
<tr>
|
|
<th>Backend</th>
|
|
<th>Servers Healthy</th>
|
|
<th>Responses</th>
|
|
<th>Sessions</th>
|
|
<th>Queue</th>
|
|
</tr>
|
|
{{ range query "count by (backend)(haproxy_backend_http_responses_total{job='haproxy'})" | sortByLabel "backend" }}
|
|
<tr>
|
|
<td><a href="haproxy-backend.html?backend={{ .Labels.backend }}">{{ .Labels.backend }}</a></td>
|
|
<td>{{ template "prom_query_drilldown" (args (printf "sum(min by (server)(haproxy_server_up{job='haproxy',backend='%s'}))" .Labels.backend)) }} / {{ template "prom_query_drilldown" (args (printf "count(sum by (server)(haproxy_server_up{job='haproxy',backend='%s'}))" .Labels.backend))}}</tdd>
|
|
<td>{{ template "prom_query_drilldown" (args (printf "sum by(backend)(irate(haproxy_backend_http_responses_total{job='haproxy',backend='%s'}[5m]))" .Labels.backend) "/s" "humanizeNoSmallPrefix") }}</td>
|
|
<td>{{ template "prom_query_drilldown" (args (printf "sum by(backend)(haproxy_backend_current_sessions{job='haproxy',backend='%s'})" .Labels.backend) "" "humanize") }}</td>
|
|
<td>{{ template "prom_query_drilldown" (args (printf "sum by(backend)(haproxy_backend_current_queue{job='haproxy',backend='%s'})" .Labels.backend) "" "humanize") }}</td>
|
|
</tr>
|
|
{{ else }}
|
|
<tr><td colspan=4>No backends found.</td></tr>
|
|
{{ end }}
|
|
|
|
|
|
{{ template "prom_content_tail" . }}
|
|
|
|
{{ template "tail" }}
|