More detailed output
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PROGNAME=`basename $0`
|
PROGNAME=`basename $0`
|
||||||
VERSION="Version 1.1.2"
|
VERSION="Version 1.1.3"
|
||||||
AUTHOR="Guillaume Coré <fridim@onfi.re>, Ales Nosek <ales.nosek@gmail.com>"
|
AUTHOR="Guillaume Coré <fridim@onfi.re>, Ales Nosek <ales.nosek@gmail.com>"
|
||||||
|
|
||||||
ST_OK=0
|
ST_OK=0
|
||||||
@@ -142,34 +142,34 @@ fi
|
|||||||
|
|
||||||
if [ "$primary" = 'TRUE' ]; then
|
if [ "$primary" = 'TRUE' ]; then
|
||||||
if [ "$r2" != 'Primary' ]; then
|
if [ "$r2" != 'Primary' ]; then
|
||||||
echo "CRITICAL: node is not primary"
|
echo "CRITICAL: node is not primary (wsrep_cluster_status)"
|
||||||
ST_FINAL=$ST_CR
|
ST_FINAL=$ST_CR
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$r4" != 'ON' ]; then
|
if [ "$r4" != 'ON' ]; then
|
||||||
echo "CRITICAL: node is not ready"
|
echo "CRITICAL: node is not ready (wsrep_ready)"
|
||||||
ST_FINAL=$ST_CR
|
ST_FINAL=$ST_CR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$r5" != 'ON' ]; then
|
if [ "$r5" != 'ON' ]; then
|
||||||
echo "CRITICAL: node is not connected"
|
echo "CRITICAL: node is not connected (wsrep_connected)"
|
||||||
ST_FINAL=$ST_CR
|
ST_FINAL=$ST_CR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$r6" != 'Synced' ]; then
|
if [ "$r6" != 'Synced' ]; then
|
||||||
echo "CRITICAL: node is not synced"
|
echo "CRITICAL: node is not synced - actual state is: $r6 (wsrep_local_state_comment)"
|
||||||
ST_FINAL=$ST_CR
|
ST_FINAL=$ST_CR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $r1 -gt $warn ]; then
|
if [ $r1 -gt $warn ]; then
|
||||||
echo "OK: number of NODES = $r1"
|
echo "OK: number of NODES = $r1 (wsrep_cluster_size)"
|
||||||
ST_FINAL=${ST_FINAL-$ST_OK}
|
ST_FINAL=${ST_FINAL-$ST_OK}
|
||||||
elif [ $r1 -le $crit ]; then
|
elif [ $r1 -le $crit ]; then
|
||||||
echo "CRITICAL: number of NODES = $r1"
|
echo "CRITICAL: number of NODES = $r1 (wsrep_cluster_size)"
|
||||||
ST_FINAL=$ST_CR
|
ST_FINAL=$ST_CR
|
||||||
elif [ $r1 -le $warn ]; then
|
elif [ $r1 -le $warn ]; then
|
||||||
echo "WARNING: number of NODES = $r1"
|
echo "WARNING: number of NODES = $r1 (wsrep_cluster_size)"
|
||||||
ST_FINAL=${ST_FINAL-$ST_WR}
|
ST_FINAL=${ST_FINAL-$ST_WR}
|
||||||
else
|
else
|
||||||
exit $ST_UK
|
exit $ST_UK
|
||||||
|
|||||||
Reference in New Issue
Block a user