forked from prometheus/prometheus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
haproxy-backend.html
58 lines (54 loc) · 2.85 KB
/
haproxy-backend.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{{ template "head" . }}
{{ template "prom_right_table_head" }}
<tr><th>{{ .Params.backend }}</th><th>{{ template "prom_query_drilldown" (args (printf "sum(min by (server)(haproxy_server_up{job='haproxy',backend='%s'}))" .Params.backend)) }} / {{ template "prom_query_drilldown" (args (printf "count(sum by (server)(haproxy_server_up{job='haproxy',backend='%s'}))" .Params.backend))}}</th></tr>
<tr>
<td>Responses</td>
<td>{{ template "prom_query_drilldown" (args (printf "sum(irate(haproxy_backend_http_responses_total{job='haproxy',backend='%s'}[5m]))" .Params.backend) "/s" "humanizeNoSmallPrefix") }}</td>
</tr>
<tr>
<td>Data In</td>
<td>{{ template "prom_query_drilldown" (args (printf "sum(irate(haproxy_backend_bytes_in_total{job='haproxy',backend='%s'}[5m]))" .Params.backend) "B/s" "humanize") }}</td>
</tr>
<tr>
<td>Data Out</td>
<td>{{ template "prom_query_drilldown" (args (printf "sum(irate(haproxy_backend_bytes_out_total{job='haproxy',backend='%s'}[5m]))" .Params.backend) "B/s" "humanize") }}</td>
</tr>
<tr>
<td>Current Sessions</td>
<td>{{ template "prom_query_drilldown" (args (printf "sum(haproxy_backend_current_sessions{job='haproxy',backend='%s'})" .Params.backend) "" "humanize") }}</td>
</tr>
<tr>
<td>Current Queue</td>
<td>{{ template "prom_query_drilldown" (args (printf "sum(haproxy_backend_current_queue{job='haproxy',backend='%s'})" .Params.backend) "" "humanize") }}</td>
</tr>
<tr><th colspan="2">Server Errors</th></tr>
<tr>
<td>Connection Errors</td>
<td>{{ template "prom_query_drilldown" (args (printf "sum(irate(haproxy_backend_connection_errors_total{job='haproxy',backend='%s'}[5m]))" .Params.backend) "/s" "humanizeNoSmallPrefix") }}</td>
</tr>
<tr>
<td>Response Errors</td>
<td>{{ template "prom_query_drilldown" (args (printf "sum(irate(haproxy_backend_connection_errors_total{job='haproxy',backend='%s'}[5m]))" .Params.backend) "/s" "humanizeNoSmallPrefix") }}</td>
</tr>
<tr>
<td>Retry Warnings</td>
<td>{{ template "prom_query_drilldown" (args (printf "sum(irate(haproxy_backend_retry_warnings_total{job='haproxy',backend='%s'}[5m]))" .Params.backend) "/s" "humanizeNoSmallPrefix") }}</td>
</tr>
{{ template "prom_right_table_tail" }}
{{ template "prom_content_head" . }}
<h1>HAProxy Backend - {{ .Params.backend }}</h1>
<h3>Responses</h3>
<div id="responsesGraph"></div>
<script>
new PromConsole.Graph({
node: document.querySelector("#responsesGraph"),
expr: "sum by (code)(irate(haproxy_backend_http_responses_total{job='haproxy',backend='{{ .Params.backend }}'}[5m]))",
renderer: 'area',
yTitle: 'Queries',
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
yUnits: '/s'
})
</script>
{{ template "prom_content_tail" . }}
{{ template "tail" }}