aboutsummaryrefslogtreecommitdiffstats
path: root/charms/trusty/contrail-analytics/hooks/charmhelpers/contrib/openstack/files/check_haproxy_queue_depth.sh
diff options
context:
space:
mode:
authorStuart Mackie <wsmackie@juniper.net>2017-03-23 06:19:54 -0700
committerStuart Mackie <wsmackie@juniper.net>2017-03-23 06:19:54 -0700
commit88df88a19674ccc0017836941b8ee32eaadf19fb (patch)
treef930c90f75846ec8d8e33cf27325ff8fafc85d5c /charms/trusty/contrail-analytics/hooks/charmhelpers/contrib/openstack/files/check_haproxy_queue_depth.sh
parent9f50a40437477432a21b326b15c343ca6b8fe516 (diff)
Deleted charms with wrong license. Will source them differently in future.
Change-Id: I0fc99ea03c6b6ca4701e63793cb2be60e56c7588 Signed-off-by: Stuart Mackie <wsmackie@juniper.net>
Diffstat (limited to 'charms/trusty/contrail-analytics/hooks/charmhelpers/contrib/openstack/files/check_haproxy_queue_depth.sh')
-rwxr-xr-xcharms/trusty/contrail-analytics/hooks/charmhelpers/contrib/openstack/files/check_haproxy_queue_depth.sh30
1 files changed, 0 insertions, 30 deletions
diff --git a/charms/trusty/contrail-analytics/hooks/charmhelpers/contrib/openstack/files/check_haproxy_queue_depth.sh b/charms/trusty/contrail-analytics/hooks/charmhelpers/contrib/openstack/files/check_haproxy_queue_depth.sh
deleted file mode 100755
index 3ebb532..0000000
--- a/charms/trusty/contrail-analytics/hooks/charmhelpers/contrib/openstack/files/check_haproxy_queue_depth.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-#--------------------------------------------
-# This file is managed by Juju
-#--------------------------------------------
-#
-# Copyright 2009,2012 Canonical Ltd.
-# Author: Tom Haddon
-
-# These should be config options at some stage
-CURRQthrsh=0
-MAXQthrsh=100
-
-AUTH=$(grep -r "stats auth" /etc/haproxy | head -1 | awk '{print $4}')
-
-HAPROXYSTATS=$(/usr/lib/nagios/plugins/check_http -a ${AUTH} -I 127.0.0.1 -p 8888 -u '/;csv' -v)
-
-for BACKEND in $(echo $HAPROXYSTATS| xargs -n1 | grep BACKEND | awk -F , '{print $1}')
-do
- CURRQ=$(echo "$HAPROXYSTATS" | grep $BACKEND | grep BACKEND | cut -d , -f 3)
- MAXQ=$(echo "$HAPROXYSTATS" | grep $BACKEND | grep BACKEND | cut -d , -f 4)
-
- if [[ $CURRQ -gt $CURRQthrsh || $MAXQ -gt $MAXQthrsh ]] ; then
- echo "CRITICAL: queue depth for $BACKEND - CURRENT:$CURRQ MAX:$MAXQ"
- exit 2
- fi
-done
-
-echo "OK: All haproxy queue depths looking good"
-exit 0
-