Skip to content

Commit e110597

Browse files
authored
Merge pull request #19 from benprew/proxy-multiple-backends
feat: WARN when 1 of a multi-backend proxy is down, CRIT when all down
2 parents f1f5d0b + d2c6613 commit e110597

10 files changed

+350
-54
lines changed

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.PHONY: test
22

33
test:
4-
test/test_check_haproxy.sh
4+
prove -v test/test_check_haproxy.sh

Diff for: check_haproxy.rb

+18-29
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
status = ['OK', 'WARN', 'CRIT', 'UNKN']
1717

1818
@proxies = []
19-
@errors = []
20-
@perfdata = []
19+
@errors = { OK => [], WARNING => [], CRITICAL => [], UNKNOWN => [] }
2120
options = OpenStruct.new
22-
options.proxies = []
21+
options.proxies = nil
2322

2423
op = OptionParser.new do |opts|
2524
opts.banner = 'Usage: check_haproxy.rb [options]'
@@ -149,12 +148,6 @@ def haproxy_response(options)
149148
end
150149
end
151150

152-
def exit_code(code=0)
153-
@exit_code ||= OK
154-
@exit_code = code if code > @exit_code
155-
@exit_code
156-
end
157-
158151
header = nil
159152

160153
haproxy_response(options).each do |line|
@@ -168,18 +161,18 @@ def exit_code(code=0)
168161

169162
row = header.zip(CSV.parse_line(line)).reduce({}) { |hash, val| hash.merge({val[0] => val[1]}) }
170163

171-
next unless options.proxies.empty? || options.proxies.include?(row['pxname'])
164+
next if options.proxies && !options.proxies.include?(row['pxname'])
172165
next if ['statistics', 'admin_stats', 'stats'].include? row['pxname']
173166
next if row['status'] == 'no check'
174167

175-
role = row['act'].to_i > 0 ? 'active ' : (row['bck'].to_i > 0 ? 'backup ' : '')
168+
role = %w[BACKEND FRONTEND].include?(row['svname']) || row['bck'].to_i == 0 ? :act : :bck
176169
if row['slim'].to_i == 0
177170
session_percent_usage = 0
178171
else
179172
session_percent_usage = row['scur'].to_i * 100 / row['slim'].to_i
180173
end
181174

182-
proxy_name = sprintf("%s %s %s %s", row['pxname'], row['svname'], row['status'], role)
175+
proxy_name = sprintf("%s %s (%s) %s", row['pxname'], row['svname'], role, row['status'])
183176
message = sprintf("%s\tsess=%s/%s(%d%%) smax=%s",
184177
proxy_name,
185178
row['scur'],
@@ -188,33 +181,29 @@ def exit_code(code=0)
188181
row['smax'])
189182
@proxies << message
190183

191-
if row['status'].include?('DOWN')
192-
@errors << message
193-
exit_code CRITICAL
184+
if role == :act && row['status'] == 'DOWN'
185+
err_level = row['svname'] == 'BACKEND' ? CRITICAL : WARNING
186+
@errors[err_level] << message
194187
end
195188

196189
if options.critical && session_percent_usage >= options.critical.to_i
197-
@errors << sprintf("%s - too many sessions %s/%s(%d%%)", proxy_name, row['scur'], row['slim'], session_percent_usage)
198-
exit_code CRITICAL
190+
@errors[CRITICAL] << sprintf("%s - too many sessions %s/%s(%d%%)", proxy_name, row['scur'], row['slim'], session_percent_usage)
199191
elsif options.warning && session_percent_usage >= options.warning.to_i
200-
@errors << sprintf("%s - too many sessions %s/%s(%d%%)", proxy_name, row['scur'], row['slim'], session_percent_usage)
201-
exit_code WARNING
192+
@errors[WARNING] << sprintf("%s - too many sessions %s/%s(%d%%)", proxy_name, row['scur'], row['slim'], session_percent_usage)
202193
end
203194
end
204195

205-
if @errors.length == 0
206-
@errors << sprintf("%d proxies found", @proxies.length)
207-
end
196+
@errors[OK] << "#{@proxies.length} proxies found"
208197

209-
if @proxies.length == 0
210-
@errors << "No proxies listed as up or down"
211-
exit_code UNKNOWN
212-
end
198+
@errors[UNKNOWN] << "No proxies listed as up or down" if @proxies.empty?
213199

214-
puts "HAPROXY " + status[exit_code] + ": " + @errors.join('; ')
215-
puts @proxies.sort
200+
[CRITICAL, WARNING, UNKNOWN, OK].each do |exit_code|
201+
next if @errors[exit_code].empty?
216202

217-
exit exit_code
203+
puts "HAPROXY #{status[exit_code]}: #{@errors[exit_code].join('; ')}"
204+
puts @proxies.sort
205+
exit exit_code
206+
end
218207

219208
=begin
220209
Copyright (C) 2013 Ben Prew

Diff for: test/haproxy/1wt_eu.csv.expected

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
HAPROXY WARN: www www (act) DOWN sess=0/20(0%) smax=14; git www (act) DOWN sess=0/2(0%) smax=2
2+
demo BACKEND (act) UP sess=1/20(5%) smax=10
3+
git BACKEND (act) UP sess=0/2(0%) smax=13
4+
git bck (bck) UP sess=0/2(0%) smax=2
5+
git www (act) DOWN sess=0/2(0%) smax=2
6+
http-in FRONTEND (act) OPEN sess=5/100(5%) smax=25
7+
http-in IPv4-cached (act) OPEN sess=0/100(0%) smax=14
8+
http-in IPv4-direct (act) OPEN sess=1/100(1%) smax=25
9+
http-in IPv6-direct (act) OPEN sess=0/100(0%) smax=12
10+
http-in local (act) OPEN sess=0/100(0%) smax=0
11+
http-in local-https (act) OPEN sess=0/100(0%) smax=5
12+
www BACKEND (act) UP sess=0/100(0%) smax=21
13+
www bck (bck) UP sess=4/10(40%) smax=10
14+
www www (act) DOWN sess=0/20(0%) smax=14

Diff for: test/haproxy/dmnews_com.csv.expected

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
HAPROXY OK: 58 proxies found
2+
85 FRONTEND (act) OPEN sess=21/4096(0%) smax=54
3+
85_ads_cygnus_com_ BACKEND (act) UP sess=0/410(0%) smax=0
4+
85_beta_manage_ 1225112e50221c6c82e36b615e931214a349628e (act) UP sess=0/-1(0%) smax=0
5+
85_beta_manage_ BACKEND (act) UP sess=0/410(0%) smax=0
6+
85_beta_manage_ af6cecda2ec36f76ac732d6a07c14f28ad8729db (act) UP sess=0/-1(0%) smax=0
7+
85_beta_manage_ ce4d0b217a10d77aeb19ead09d5cebc5fddcfe57 (act) UP sess=0/-1(0%) smax=0
8+
85_beta_manage_ f0a5e20d1ed25a46db1277ffcd27f7834089b9a3 (act) UP sess=0/-1(0%) smax=0
9+
85_clarity_ BACKEND (act) UP sess=0/410(0%) smax=2
10+
85_components_ BACKEND (act) UP sess=0/410(0%) smax=4
11+
85_contracts_ BACKEND (act) UP sess=0/410(0%) smax=1
12+
85_cygnus_ BACKEND (act) UP sess=0/410(0%) smax=1
13+
85_dfp_www_ 643ba73c76c8fe43a593deff8c267a3a8d6a39a2 (act) UP sess=0/-1(0%) smax=1
14+
85_dfp_www_ BACKEND (act) UP sess=0/410(0%) smax=1
15+
85_email_ BACKEND (act) UP sess=0/410(0%) smax=2
16+
85_emailx_email_ 643ba73c76c8fe43a593deff8c267a3a8d6a39a2 (act) UP sess=0/-1(0%) smax=0
17+
85_emailx_email_ BACKEND (act) UP sess=0/410(0%) smax=0
18+
85_emailx_newsletter_dmnews_com_ 643ba73c76c8fe43a593deff8c267a3a8d6a39a2 (act) UP sess=0/-1(0%) smax=0
19+
85_emailx_newsletter_dmnews_com_ BACKEND (act) UP sess=0/410(0%) smax=0
20+
85_local_ 867b545e87c85dc3db732231ca4b23c510b744a3 (act) UP sess=1/-1(0%) smax=5
21+
85_local_ BACKEND (act) UP sess=1/410(0%) smax=5
22+
85_manage_ 1225112e50221c6c82e36b615e931214a349628e (act) UP sess=0/-1(0%) smax=1
23+
85_manage_ BACKEND (act) UP sess=0/410(0%) smax=3
24+
85_manage_ af6cecda2ec36f76ac732d6a07c14f28ad8729db (act) UP sess=0/-1(0%) smax=1
25+
85_manage_ ce4d0b217a10d77aeb19ead09d5cebc5fddcfe57 (act) UP sess=0/-1(0%) smax=1
26+
85_manage_ f0a5e20d1ed25a46db1277ffcd27f7834089b9a3 (act) UP sess=0/-1(0%) smax=1
27+
85_manage_as3_com_ 1225112e50221c6c82e36b615e931214a349628e (act) UP sess=0/-1(0%) smax=0
28+
85_manage_as3_com_ BACKEND (act) UP sess=0/410(0%) smax=0
29+
85_manage_as3_com_ af6cecda2ec36f76ac732d6a07c14f28ad8729db (act) UP sess=0/-1(0%) smax=0
30+
85_manage_as3_com_ ce4d0b217a10d77aeb19ead09d5cebc5fddcfe57 (act) UP sess=0/-1(0%) smax=0
31+
85_manage_as3_com_ f0a5e20d1ed25a46db1277ffcd27f7834089b9a3 (act) UP sess=0/-1(0%) smax=0
32+
85_media_ 109eccc80b81bc17dc95afe54129a421a8583fe0 (act) UP sess=0/-1(0%) smax=0
33+
85_media_ 60f4bcef14080f1b0b0e4a36543f28b766e4dfe5 (act) UP sess=0/-1(0%) smax=0
34+
85_media_ 62bbdb9eb1cae28e4e896664fe5f514eee28231f (act) UP sess=0/-1(0%) smax=0
35+
85_media_ 8be90cae223ef6618d73c91e3fcb52ea33a6a2a5 (act) UP sess=0/-1(0%) smax=0
36+
85_media_ BACKEND (act) UP sess=0/410(0%) smax=0
37+
85_media_backend_ 109eccc80b81bc17dc95afe54129a421a8583fe0 (act) UP sess=0/-1(0%) smax=1
38+
85_media_backend_ 60f4bcef14080f1b0b0e4a36543f28b766e4dfe5 (act) UP sess=0/-1(0%) smax=1
39+
85_media_backend_ 62bbdb9eb1cae28e4e896664fe5f514eee28231f (act) UP sess=0/-1(0%) smax=1
40+
85_media_backend_ 8be90cae223ef6618d73c91e3fcb52ea33a6a2a5 (act) UP sess=0/-1(0%) smax=1
41+
85_media_backend_ BACKEND (act) UP sess=0/410(0%) smax=3
42+
85_newsletter_ BACKEND (act) UP sess=0/410(0%) smax=1
43+
85_olytics_ 12a325ceaf9c722ee5b64574e6fd48f58922bb22 (act) UP sess=0/-1(0%) smax=5
44+
85_olytics_ 5244b59db100a9e2bf6fa47e231ea5bc82630b43 (act) UP sess=0/-1(0%) smax=5
45+
85_olytics_ 60c3cd51ecd7b24adcfa5685babc50def99cf712 (act) UP sess=1/-1(0%) smax=5
46+
85_olytics_ BACKEND (act) UP sess=1/410(0%) smax=10
47+
85_olytics_ ec3c1e1a5e262f63b1dfd665f5266eeacf003175 (act) UP sess=0/-1(0%) smax=4
48+
85_radix_ BACKEND (act) UP sess=0/410(0%) smax=6
49+
85_radix_ bac3b76021c19ee2b49c7cd710f46179bd1ffc6c (act) UP sess=0/-1(0%) smax=6
50+
85_www_ BACKEND (act) UP sess=1/410(0%) smax=33
51+
85_www_as3_com_ BACKEND (act) UP sess=0/410(0%) smax=0
52+
85_www_cu_ 72078c67dbca4c040cba09213b079f8db14f68a8 (act) UP sess=0/-1(0%) smax=1
53+
85_www_cu_ BACKEND (act) UP sess=0/410(0%) smax=1
54+
85_www_locksmithledger_com_admin BACKEND (act) UP sess=0/410(0%) smax=0
55+
85_www_locksmithledger_com_app BACKEND (act) UP sess=0/410(0%) smax=0
56+
85_www_locksmithledger_com_codesexpress BACKEND (act) UP sess=0/410(0%) smax=0
57+
85_www_locksmithledger_com_reg BACKEND (act) UP sess=0/410(0%) smax=0
58+
default BACKEND (act) UP sess=0/410(0%) smax=0
59+
default FRONTEND (act) OPEN sess=0/4096(0%) smax=0

Diff for: test/haproxy/fedoraproject_org.csv.expected

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
HAPROXY CRIT: osbs-backend BACKEND (act) DOWN sess=0/500(0%) smax=0
2+
autocloud-backend BACKEND (act) UP sess=0/500(0%) smax=9
3+
autocloud-backend autocloud-web01 (act) UP sess=0/-1(0%) smax=5
4+
autocloud-backend autocloud-web02 (act) UP sess=0/-1(0%) smax=5
5+
autocloud-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=9
6+
badges-backend BACKEND (act) UP sess=0/500(0%) smax=38
7+
badges-backend badges-web01 (act) UP sess=0/-1(0%) smax=37
8+
badges-backend badges-web02 (act) UP sess=0/-1(0%) smax=26
9+
badges-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=38
10+
blockerbugs-backend BACKEND (act) UP sess=0/500(0%) smax=12
11+
blockerbugs-backend blockerbugs01 (act) UP sess=0/-1(0%) smax=6
12+
blockerbugs-backend blockerbugs02 (act) UP sess=0/-1(0%) smax=6
13+
blockerbugs-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=12
14+
datagrepper-backend BACKEND (act) UP sess=0/500(0%) smax=36
15+
datagrepper-backend datagrepper01 (act) UP sess=0/-1(0%) smax=19
16+
datagrepper-backend datagrepper02 (act) UP sess=0/-1(0%) smax=17
17+
datagrepper-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=36
18+
fas-backend BACKEND (act) UP sess=0/500(0%) smax=37
19+
fas-backend fas01 (act) UP sess=0/-1(0%) smax=17
20+
fas-backend fas02 (act) UP sess=0/-1(0%) smax=11
21+
fas-backend fas03 (act) UP sess=0/-1(0%) smax=13
22+
fas-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=37
23+
fedmsg-raw-zmq-inbound-backend BACKEND (act) UP sess=0/500(0%) smax=0
24+
fedmsg-raw-zmq-inbound-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=0
25+
fedmsg-raw-zmq-outbound-backend BACKEND (act) UP sess=14/500(2%) smax=31
26+
fedmsg-raw-zmq-outbound-frontend FRONTEND (act) OPEN sess=14/5000(0%) smax=31
27+
fedmsg-websockets-backend BACKEND (act) UP sess=0/500(0%) smax=16
28+
fedmsg-websockets-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=16
29+
fedocal-backend BACKEND (act) UP sess=0/500(0%) smax=8
30+
fedocal-backend fedocal01 (act) UP sess=0/-1(0%) smax=4
31+
fedocal-backend fedocal02 (act) UP sess=0/-1(0%) smax=4
32+
fedocal-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=8
33+
fp-wiki-backend BACKEND (act) UP sess=0/500(0%) smax=97
34+
fp-wiki-backend wiki01 (act) UP sess=0/-1(0%) smax=48
35+
fp-wiki-backend wiki02 (act) UP sess=0/-1(0%) smax=49
36+
fp-wiki-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=97
37+
freemedia-backend BACKEND (act) UP sess=0/500(0%) smax=1
38+
freemedia-backend sundries01 (act) UP sess=0/-1(0%) smax=1
39+
freemedia-backend sundries02 (act) UP sess=0/-1(0%) smax=0
40+
freemedia-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=1
41+
freshmaker-backend BACKEND (act) UP sess=0/500(0%) smax=0
42+
freshmaker-backend freshmaker-frontend01 (act) UP sess=0/-1(0%) smax=0
43+
freshmaker-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=0
44+
geoip-city-backend BACKEND (act) UP sess=0/500(0%) smax=4
45+
geoip-city-backend sundries01 (act) UP sess=0/-1(0%) smax=3
46+
geoip-city-backend sundries02 (act) UP sess=0/-1(0%) smax=2
47+
geoip-city-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=4
48+
github2fedmsg-backend BACKEND (act) UP sess=0/500(0%) smax=4
49+
github2fedmsg-backend github2fedmsg01 (act) UP sess=0/-1(0%) smax=4
50+
github2fedmsg-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=4
51+
hubs-backend BACKEND (act) UP sess=0/500(0%) smax=0
52+
hubs-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=0
53+
ipa-backend BACKEND (act) UP sess=0/500(0%) smax=2
54+
ipa-backend ipa01 (act) UP sess=0/-1(0%) smax=2
55+
ipa-backend ipa02 (bck) UP sess=0/-1(0%) smax=0
56+
ipa-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=2
57+
ipa01-backend BACKEND (act) UP sess=0/500(0%) smax=0
58+
ipa01-backend ipa01 (act) UP sess=0/-1(0%) smax=0
59+
ipa01-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=0
60+
ipsilon-backend BACKEND (act) UP sess=0/500(0%) smax=5
61+
ipsilon-backend ipsilon01 (act) UP sess=0/-1(0%) smax=2
62+
ipsilon-backend ipsilon02 (act) UP sess=0/-1(0%) smax=3
63+
ipsilon-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=5
64+
kerneltest-backend BACKEND (act) UP sess=0/500(0%) smax=6
65+
kerneltest-backend kerneltest01 (act) UP sess=0/-1(0%) smax=6
66+
kerneltest-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=6
67+
koschei-backend BACKEND (act) UP sess=0/500(0%) smax=7
68+
koschei-backend koschei-web01 (act) UP sess=0/-1(0%) smax=3
69+
koschei-backend koschei-web02 (act) UP sess=0/-1(0%) smax=4
70+
koschei-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=7
71+
krb5-backend BACKEND (act) UP sess=0/500(0%) smax=0
72+
krb5-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=0
73+
mbs-backend BACKEND (act) UP sess=0/500(0%) smax=2
74+
mbs-backend mbs-frontend01 (act) UP sess=0/-1(0%) smax=2
75+
mbs-backend mbs-frontend02 (act) UP sess=0/-1(0%) smax=1
76+
mbs-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=2
77+
mdapi-backend BACKEND (act) UP sess=0/500(0%) smax=243
78+
mdapi-backend mdapi01 (act) UP sess=0/-1(0%) smax=243
79+
mdapi-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=243
80+
mirror-lists-backend BACKEND (act) UP sess=0/500(0%) smax=413
81+
mirror-lists-backend mirrorlist-local1 (act) UP sess=0/-1(0%) smax=316
82+
mirror-lists-backend mirrorlist-local2 (act) UP sess=0/-1(0%) smax=318
83+
mirror-lists-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=413
84+
mirrormanager-backend BACKEND (act) UP sess=0/500(0%) smax=3
85+
mirrormanager-backend mm-frontend01 (act) UP sess=0/-1(0%) smax=2
86+
mirrormanager-backend mm-frontend02 (act) UP sess=0/-1(0%) smax=2
87+
mirrormanager-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=3
88+
modernpaste-backend BACKEND (act) UP sess=0/500(0%) smax=15
89+
modernpaste-backend modernpaste01 (act) UP sess=0/-1(0%) smax=8
90+
modernpaste-backend modernpaste02 (act) UP sess=0/-1(0%) smax=8
91+
modernpaste-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=15
92+
notifs-web-backend BACKEND (act) UP sess=0/500(0%) smax=8
93+
notifs-web-backend notifs-web01 (act) UP sess=0/-1(0%) smax=4
94+
notifs-web-backend notifs-web02 (act) UP sess=0/-1(0%) smax=4
95+
notifs-web-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=8
96+
nuancier-backend BACKEND (act) UP sess=0/500(0%) smax=40
97+
nuancier-backend nuancier01 (act) UP sess=0/-1(0%) smax=38
98+
nuancier-backend nuancier02 (act) UP sess=0/-1(0%) smax=24
99+
nuancier-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=40
100+
oci-candidate-registry-backend BACKEND (act) UP sess=0/500(0%) smax=1
101+
oci-candidate-registry-backend oci-candidate-registry01 (act) UP sess=0/-1(0%) smax=1
102+
oci-candidate-registry-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=1
103+
oci-registry-backend BACKEND (act) UP sess=0/500(0%) smax=17
104+
oci-registry-backend oci-registry01 (act) UP sess=0/-1(0%) smax=9
105+
oci-registry-backend oci-registry02 (act) UP sess=0/-1(0%) smax=8
106+
oci-registry-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=17
107+
odcs-backend BACKEND (act) UP sess=0/500(0%) smax=3
108+
odcs-backend odcs-frontend01 (act) UP sess=0/-1(0%) smax=3
109+
odcs-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=3
110+
openqa-backend BACKEND (act) UP sess=0/500(0%) smax=0
111+
openqa-backend openqa01 (act) UP sess=0/-1(0%) smax=0
112+
openqa-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=0
113+
osbs-backend BACKEND (act) DOWN sess=0/500(0%) smax=0
114+
osbs-backend osbs-master01 (act) DOWN sess=0/-1(0%) smax=0
115+
osbs-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=0
116+
packages-backend BACKEND (act) UP sess=0/500(0%) smax=22
117+
packages-backend packages03 (act) UP sess=0/-1(0%) smax=11
118+
packages-backend packages04 (act) UP sess=0/-1(0%) smax=11
119+
packages-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=22
120+
pdc-backend BACKEND (act) UP sess=0/500(0%) smax=7
121+
pdc-backend pdc-web01 (act) UP sess=0/-1(0%) smax=7
122+
pdc-backend pdc-web02 (act) UP sess=0/-1(0%) smax=7
123+
pdc-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=7
124+
stats-backend BACKEND (act) UP sess=1/500(0%) smax=5
125+
stats-frontend FRONTEND (act) OPEN sess=1/5000(0%) smax=8
126+
totpcgiprovision-backend BACKEND (act) UP sess=0/500(0%) smax=0
127+
totpcgiprovision-backend fas01 (act) UP sess=0/-1(0%) smax=0
128+
totpcgiprovision-backend fas02 (act) UP sess=0/-1(0%) smax=0
129+
totpcgiprovision-backend fas03 (act) UP sess=0/-1(0%) smax=0
130+
totpcgiprovision-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=0
131+
voting-backend BACKEND (act) UP sess=0/500(0%) smax=4
132+
voting-backend elections01 (act) UP sess=0/-1(0%) smax=2
133+
voting-backend elections02 (act) UP sess=0/-1(0%) smax=2
134+
voting-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=4
135+
zanata2fedmsg-backend BACKEND (act) UP sess=0/500(0%) smax=0
136+
zanata2fedmsg-backend zanata2fedmsg01 (act) UP sess=0/-1(0%) smax=0
137+
zanata2fedmsg-frontend FRONTEND (act) OPEN sess=0/5000(0%) smax=0

Diff for: test/haproxy/nordisch_org.csv.expected

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
HAPROXY OK: 13 proxies found
2+
chronograf BACKEND (act) UP sess=0/1(0%) smax=0
3+
http FRONTEND (act) OPEN sess=2/10000(0%) smax=48
4+
http sock-1 (act) OPEN sess=0/10000(0%) smax=7
5+
http sock-2 (act) OPEN sess=0/10000(0%) smax=1
6+
http sock-3 (act) OPEN sess=2/10000(0%) smax=48
7+
hugo BACKEND (act) UP sess=0/1000(0%) smax=1
8+
influxdb-admin BACKEND (act) UP sess=0/1(0%) smax=0
9+
influxdb-data BACKEND (act) UP sess=0/1(0%) smax=0
10+
minio BACKEND (act) UP sess=0/1000(0%) smax=0
11+
nginx BACKEND (act) UP sess=0/1000(0%) smax=48
12+
nginx nginx-local (act) UP sess=0/-1(0%) smax=48
13+
radicale BACKEND (act) UP sess=0/1000(0%) smax=1
14+
torrent BACKEND (act) UP sess=0/1(0%) smax=0

Diff for: test/haproxy/partial-backend-failure.csv

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,lbtot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,
2+
ubuntuusers-static,she,0,0,0,0,512,0,0,0,,0,,0,0,0,0,UP,1,1,0,19,5,559046,168,,1,18,1,,0,,2,0,,0,L4OK,,6,0,0,0,0,0,0,0,,,,0,0,,,,,-1,,,0,0,0,0,
3+
ubuntuusers-static,kanu,0,0,0,0,512,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,4857267,4857267,,1,18,2,,0,,2,0,,0,L4TOUT,,2001,0,0,0,0,0,0,0,,,,0,0,,,,,-1,,,0,0,0,0,
4+
ubuntuusers-static,BACKEND,0,0,0,1,820,761,183203,108701,0,0,,0,0,0,0,UP,1,1,0,,5,559046,168,,1,18,0,,0,,1,0,,2,,,,0,0,761,0,0,0,,,,,0,0,0,0,0,0,-1,,,0,0,0,0,
5+
ubuntuusers-media,she,0,0,0,0,512,0,0,0,,0,,0,0,0,0,UP,1,1,0,18,4,559046,163,,1,20,1,,0,,2,0,,0,L4OK,,6,0,0,0,0,0,0,0,,,,0,0,,,,,-1,,,0,0,0,0,
6+
ubuntuusers-media,kanu,0,0,0,0,512,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,4857266,4857266,,1,20,2,,0,,2,0,,0,L4TOUT,,2001,0,0,0,0,0,0,0,,,,0,0,,,,,-1,,,0,0,0,0,
7+
ubuntuusers-media,BACKEND,0,0,0,0,820,0,0,0,0,0,,0,0,0,0,UP,1,1,0,,4,559046,163,,1,20,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,,0,0,0,0,0,0,-1,,,0,0,0,0,
8+
ubuntuusers-legacy,she,0,0,0,0,512,0,0,0,,0,,0,0,0,0,UP,1,1,0,19,5,559046,167,,1,21,1,,0,,2,0,,0,L4OK,,6,0,0,0,0,0,0,0,,,,0,0,,,,,-1,,,0,0,0,0,
9+
ubuntuusers-legacy,kanu,0,0,0,0,512,0,0,0,,0,,0,0,0,0,DOWN,1,1,0,1,1,4857266,4857266,,1,21,2,,0,,2,0,,0,L4TOUT,,2001,0,0,0,0,0,0,0,,,,0,0,,,,,-1,,,0,0,0,0,
10+
ubuntuusers-legacy,BACKEND,0,0,0,0,820,0,0,0,0,0,,0,0,0,0,UP,1,1,0,,5,559046,167,,1,21,0,,0,,1,0,,0,,,,0,0,0,0,0,0,,,,,0,0,0,0,0,0,-1,,,0,0,0,0,

Diff for: test/haproxy/partial-backend-failure.csv.expected

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
HAPROXY WARN: ubuntuusers-static kanu (act) DOWN sess=0/512(0%) smax=0; ubuntuusers-media kanu (act) DOWN sess=0/512(0%) smax=0; ubuntuusers-legacy kanu (act) DOWN sess=0/512(0%) smax=0
2+
ubuntuusers-legacy BACKEND (act) UP sess=0/820(0%) smax=0
3+
ubuntuusers-legacy kanu (act) DOWN sess=0/512(0%) smax=0
4+
ubuntuusers-legacy she (act) UP sess=0/512(0%) smax=0
5+
ubuntuusers-media BACKEND (act) UP sess=0/820(0%) smax=0
6+
ubuntuusers-media kanu (act) DOWN sess=0/512(0%) smax=0
7+
ubuntuusers-media she (act) UP sess=0/512(0%) smax=0
8+
ubuntuusers-static BACKEND (act) UP sess=0/820(0%) smax=1
9+
ubuntuusers-static kanu (act) DOWN sess=0/512(0%) smax=0
10+
ubuntuusers-static she (act) UP sess=0/512(0%) smax=0

0 commit comments

Comments
 (0)