forked from prometheus/prometheus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
haproxy.html
84 lines (80 loc) · 2.91 KB
/
haproxy.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{{ template "head" . }}
{{ template "prom_right_table_head" }}
<tr>
<th>HAProxy</th>
<th>{{ template "prom_query_drilldown" (args "sum(haproxy_up{job='haproxy'})") }} / {{ template "prom_query_drilldown" (args "count(up{job='haproxy'})") }}</th></tr>
</tr>
<tr>
<td>CPU</td>
<td>{{ template "prom_query_drilldown" (args "avg by(job)(irate(haproxy_process_cpu_seconds_total{job='haproxy'}[5m]))" "s/s" "humanizeNoSmallPrefix") }}</td>
</tr>
<tr>
<td>Memory</td>
<td>{{ template "prom_query_drilldown" (args "avg by(job)(haproxy_process_resident_memory_bytes{job='haproxy'})" "B" "humanize1024") }}</td>
</tr>
<tr>
<th colspan="2">Frontend</th>
</tr>
<tr>
<td>Requests</td>
<td>{{ template "prom_query_drilldown" (args "sum(irate(haproxy_frontend_http_requests_total{job='haproxy'}[5m]))" "/s" "humanizeNoSmallPrefix") }}</td>
</tr>
<tr>
<td>Requests Denied</td>
<td>{{ template "prom_query_drilldown" (args "sum(irate(haproxy_frontend_requests_denied_total{job='haproxy'}[5m]))" "/s" "humanizeNoSmallPrefix") }}</td>
</tr>
<tr>
<td>Data In</td>
<td>{{ template "prom_query_drilldown" (args "sum(irate(haproxy_frontend_bytes_in_total{job='haproxy'}[5m]))" "B/s" "humanize") }}</td>
</tr>
<tr>
<td>Data Out</td>
<td>{{ template "prom_query_drilldown" (args "sum(irate(haproxy_frontend_bytes_out_total{job='haproxy'}[5m]))" "B/s" "humanize") }}</td>
</tr>
<tr>
<td>Current Sessions</td>
<td>{{ template "prom_query_drilldown" (args "sum(haproxy_frontend_current_sessions{job='haproxy'})" "" "humanize") }}</td>
</tr>
{{ template "prom_right_table_tail" }}
{{ template "prom_content_head" . }}
<h1>HAProxy</h1>
<h3>Frontend Requests</h3>
<div id="feRequestsGraph"></div>
<script>
new PromConsole.Graph({
node: document.querySelector("#feRequestsGraph"),
expr: "sum by (frontend)(irate(haproxy_frontend_http_requests_total{job='haproxy'}[5m]))",
renderer: 'area',
yTitle: 'Requests',
name: '[[ frontend ]]',
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
yUnits: '/s'
})
</script>
<h3>Backend Responses</h3>
<div id="responsesGraph"></div>
<script>
new PromConsole.Graph({
node: document.querySelector("#responsesGraph"),
expr: "sum by (backend)(irate(haproxy_backend_http_responses_total{job='haproxy'}[5m]))",
renderer: 'area',
yTitle: 'Responses',
name: '[[ backend ]]',
yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix,
yUnits: '/s'
})
</script>
<h3>Current Sessions</h3>
<div id="sessionsGraph"></div>
<script>
new PromConsole.Graph({
node: document.querySelector("#sessionsGraph"),
expr: "sum(haproxy_frontend_current_sessions{job='haproxy'})",
yTitle: 'Sessions',
name: 'Sessions'
})
</script>
{{ template "prom_content_tail" . }}
{{ template "tail" }}