Merge lp:~james-w/charms/precise/haproxy/fix-queue-depth-check into lp:charms/haproxy

Proposed by James Westby on 2014-07-22
Status: Merged
Merged at revision: 81
Proposed branch: lp:~james-w/charms/precise/haproxy/fix-queue-depth-check
Merge into: lp:charms/haproxy
Diff against target: 12 lines (+1/-1)
1 file modified
files/nrpe/check_haproxy_queue_depth.sh (+1/-1)
To merge this branch: bzr merge lp:~james-w/charms/precise/haproxy/fix-queue-depth-check
Reviewer Review Type Date Requested Status
JuanJo Ciarlante (community) 2014-07-22 Approve on 2014-07-23
Review via email: mp+227831@code.launchpad.net

Commit message

Fix the queue depth monitor script.

It needs to get the csv version of the page to parse, rather than
the html version.

Description of the change

Hi,

We found that the queue depth nagios check was broken, because
it was getting the html version of the status page to parse,
when it expected the csv version.

This updates it to get the csv version of the page.

Thanks,

James

To post a comment you must log in.
JuanJo Ciarlante (jjo) wrote :

LGTM, tnx for fixing.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'files/nrpe/check_haproxy_queue_depth.sh'
2--- files/nrpe/check_haproxy_queue_depth.sh 2012-11-07 22:32:06 +0000
3+++ files/nrpe/check_haproxy_queue_depth.sh 2014-07-22 21:17:08 +0000
4@@ -12,7 +12,7 @@
5
6 AUTH=$(grep -r "stats auth" /etc/haproxy | head -1 | awk '{print $4}')
7
8-HAPROXYSTATS=$(/usr/lib/nagios/plugins/check_http -a ${AUTH} -I 127.0.0.1 -p 10000 -v)
9+HAPROXYSTATS=$(/usr/lib/nagios/plugins/check_http -a ${AUTH} -I 127.0.0.1 -p 10000 -u '/;csv' -v)
10
11 for BACKEND in $(echo $HAPROXYSTATS| xargs -n1 | grep BACKEND | awk -F , '{print $1}')
12 do

Subscribers

People subscribed via source and target branches