94
94
# If the state file doesn't exist or is not readable, exit
95
95
96
96
if [ ! -e " $CHECKFILE " ]; then
97
- echo " scalelite check error: state file $CHECKFILE does not exist! Did you set up the cronjob?"
97
+ echo " SCALELITE ERROR - state file $CHECKFILE does not exist! Did you set up the cronjob?"
98
98
exit " $STATE_UNKNOWN "
99
99
elif [ ! -r " $CHECKFILE " ] ; then
100
- echo " scalelite check error: state file $CHECKFILE is not readable!"
100
+ echo " SCALELITE ERROR - state file $CHECKFILE is not readable!"
101
101
exit " $STATE_UNKNOWN "
102
102
fi
103
103
@@ -106,26 +106,26 @@ count=$(grep -c ".*" "$CHECKFILE" 2>&1)
106
106
(( count-= 1 ))
107
107
108
108
if [[ $? -gt 1 ]]; then
109
- echo " scalelite check error: $count "
109
+ echo " SCALELITE ERROR - $count "
110
110
exit " $STATE_UNKNOWN "
111
111
fi
112
112
113
113
# Count the number of nodes we have that are enabled and online and handle errors when grep fails
114
114
count_eo=$( grep -c " enabled.*online" " $CHECKFILE " 2>&1 )
115
115
if [[ $? -gt 1 ]]; then
116
- echo " scalelite check error: $count "
116
+ echo " SCALELITE ERROR - $count "
117
117
exit " $STATE_UNKNOWN "
118
118
fi
119
119
120
120
if [ " $count_eo " -gt " $warning " ]; then
121
- echo " check ok - $count_eo out of $count nodes are live"
121
+ echo " SCALELITE OK - $count_eo out of $count nodes are live"
122
122
exitstatus=$STATE_OK
123
123
else
124
124
if [ " $count_eo " -gt " $critical " ]; then
125
- echo " check warning - $count_eo out of $count nodes are live"
125
+ echo " SCALELITE WARNING - $count_eo out of $count nodes are live"
126
126
exitstatus=$STATE_WARNING
127
127
else
128
- echo " check critical - $count_eo out of $count nodes are live"
128
+ echo " SCALELITE CRITICAL - $count_eo out of $count nodes are live"
129
129
exitstatus=$STATE_CRITICAL
130
130
fi
131
131
fi
0 commit comments