Skip to content

Commit 44cc152

Browse files
committed
change messages to fit other plugins
1 parent e887369 commit 44cc152

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

check_scalelite

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ done
9494
# If the state file doesn't exist or is not readable, exit
9595

9696
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?"
9898
exit "$STATE_UNKNOWN"
9999
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!"
101101
exit "$STATE_UNKNOWN"
102102
fi
103103

@@ -106,26 +106,26 @@ count=$(grep -c ".*" "$CHECKFILE" 2>&1)
106106
((count-=1))
107107

108108
if [[ $? -gt 1 ]]; then
109-
echo "scalelite check error: $count"
109+
echo "SCALELITE ERROR - $count"
110110
exit "$STATE_UNKNOWN"
111111
fi
112112

113113
# Count the number of nodes we have that are enabled and online and handle errors when grep fails
114114
count_eo=$(grep -c "enabled.*online" "$CHECKFILE" 2>&1)
115115
if [[ $? -gt 1 ]]; then
116-
echo "scalelite check error: $count"
116+
echo "SCALELITE ERROR - $count"
117117
exit "$STATE_UNKNOWN"
118118
fi
119119

120120
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"
122122
exitstatus=$STATE_OK
123123
else
124124
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"
126126
exitstatus=$STATE_WARNING
127127
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"
129129
exitstatus=$STATE_CRITICAL
130130
fi
131131
fi

0 commit comments

Comments
 (0)