Browse Source

update the sock location to match the config change

4.1
karl anderson 9 years ago
parent
commit
5a126d9ad5
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      system/sbin/kazoo-haproxy

+ 3
- 3
system/sbin/kazoo-haproxy View File

@ -34,7 +34,7 @@ start() {
return return
fi fi
if echo "show stat" | nc -U /tmp/haproxy.sock > /dev/null 2>&1; then
if echo "show stat" | nc -U /var/run/haproxy/haproxy.sock > /dev/null 2>&1; then
echo "HAProxy is already running!" echo "HAProxy is already running!"
return return
fi fi
@ -72,7 +72,7 @@ status() {
local STATS="pxname svname qcur qmax scur smax slim stot bin bout dreq dresp ereq econ eresp wretr wredis status weight act bck chkfail chdown 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" local STATS="pxname svname qcur qmax scur smax slim stot bin bout dreq dresp ereq econ eresp wretr wredis status weight act bck chkfail chdown 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"
local TABLE_HEADER="Host|25 Backend|15 Status Active Rate 1xx 2xx 3xx 4xx 5xx Ping" local TABLE_HEADER="Host|25 Backend|15 Status Active Rate 1xx 2xx 3xx 4xx 5xx Ping"
local TABLE_VARS="svname|25 pxname|15 status scur req_rate hrsp_1xx hrsp_2xx hrsp_3xx hrsp_4xx hrsp_5xx check_duration" local TABLE_VARS="svname|25 pxname|15 status scur req_rate hrsp_1xx hrsp_2xx hrsp_3xx hrsp_4xx hrsp_5xx check_duration"
if ! echo "show stat" | nc -U /tmp/haproxy.sock > /dev/null 2>&1; then
if ! echo "show stat" | nc -U /var/run/haproxy/haproxy.sock > /dev/null 2>&1; then
echo "Unable to connect to HAProxy, ensure it is running!" echo "Unable to connect to HAProxy, ensure it is running!"
return return
fi fi
@ -88,7 +88,7 @@ status() {
printf "%-${SIZE}s |" $NAME printf "%-${SIZE}s |" $NAME
done done
echo echo
echo "show stat" | nc -U /tmp/haproxy.sock \
echo "show stat" | nc -U /var/run/haproxy/haproxy.sock \
| while IFS=',' read ${STATS}; do | while IFS=',' read ${STATS}; do
if [ -z "$svname" ]; then if [ -z "$svname" ]; then
continue continue


Loading…
Cancel
Save