Closed rayderua closed 6 years ago
From the output you show me It is acting as intended for the first two for sure and assuming the numbers from the above this also looks right to me. Critical is a higher level of event type than warning. How would you expect this to work? Maybe I am missing something.
For example monitoring free space somwhere: 20% free space -warning 10% free space - critical
so 25% - ok, 15% - warning, 5% critical
sometimes impossible to get the metric in another form (% of used instead % free)
Just compare WARN and CRITICAL as in the example below:
if ( CRIT > WARN )
if ( VALUE >= CRIT )
echo "CRITICAL"
elsif ( VALUE >= WARN )
echo "WARNING"
else
echo "OK"
fi
else
if ( VALUE <= CRIT )
echo "CRITICAL"
elsif ( VALUE <= WARN )
echo "WARNING"
else
echo "OK"
fi
fi
example: check_graphite fro nagios on ruby: https://github.com/obfuscurity/nagios-scripts/blob/master/check_graphite
I think what you might be looking for something like this:
or is there something else I am missing
closing due to inactivity feel free to respond back and we can re-open.
Hi!
I found that if the WARNING is greater than CRITICAL, then we get the wrong answers.
should be - OK
should be - WARNING
should be - CRITICAL