mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-30 07:59:40 -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.
26 lines
995 B
HTML
26 lines
995 B
HTML
{{ template "head" . }}
|
|
|
|
{{ template "prom_content_head" . }}
|
|
<h1>HAProxy Frontends</h1>
|
|
|
|
<table class="table table-condensed table-striped table-bordered" style="width: 0%">
|
|
<tr>
|
|
<th>Frontend</th>
|
|
<th>Requests</th>
|
|
<th>Sessions</th>
|
|
</tr>
|
|
{{ range query "count by (frontend)(haproxy_frontend_http_requests_total{job='haproxy'})" | sortByLabel "frontend" }}
|
|
<tr>
|
|
<td><a href="haproxy-frontend.html?frontend={{ .Labels.frontend }}">{{ .Labels.frontend }}</a></td>
|
|
<td>{{ template "prom_query_drilldown" (args (printf "sum by(frontend)(irate(haproxy_frontend_http_requests_total{job='haproxy',frontend='%s'}[5m]))" .Labels.frontend) "/s" "humanizeNoSmallPrefix") }}</td>
|
|
<td>{{ template "prom_query_drilldown" (args (printf "sum by(frontend)(haproxy_frontend_current_sessions{job='haproxy',frontend='%s'})" .Labels.frontend) "" "humanize") }}</td>
|
|
</tr>
|
|
{{ else }}
|
|
<tr><td colspan=4>No frontends found.</td></tr>
|
|
{{ end }}
|
|
|
|
|
|
{{ template "prom_content_tail" . }}
|
|
|
|
{{ template "tail" }}
|