check_cassandra_cluster.sh - issue with warning and critical thresholds
box293 opened this issue · 1 comments
box293 commented
# verify warning is less than critical
if [ "$warning " -lt "$critical" ]; then
echo "-w <warning> $warning must be less than -c <critical> $critical."
exit 3
fi
There are two problems in the if line:
"$warning "
There should not be a space between g and ".
The comments and echo line indicate that warning must be less than critical. However the if line is testing if warning is less than critical. Instead the test should be if warning is greater than critical.
Those two changes are reflected here:
# verify warning is less than critical
if [ "$warning" -gt "$critical" ]; then
echo "-w <warning> $warning must be less than -c <critical> $critical."
exit 3
fi
hashnao commented
Thx for checking. The space for the warning has been removed.