nagios / haproxy: 1024 is just not enough anymore

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2020-01-08 01:24:46 +00:00 committed by Pierre-Yves Chibon
parent 29fd108723
commit 7ef834a64f

View file

@ -28,7 +28,7 @@ def query(sockname="/var/run/haproxy-stat"):
s.connect("/var/run/haproxy-stat")
s.send('show info\n')
try:
response = s.recv(1024).strip()
response = s.recv(2048).strip()
lines = response.split('\n')
data = dict([map(str.strip, line.split(':')) for line in lines])
data = dict([(k, _numeric(v)) for k, v in data.items()])