I have a number of Windows servers that I’m monitoring with check_nt. From what I can determine the Warning and Critical parameters are thresholds which can trigger notification if the utilization is ABOVE them. In my application, I’m more concerned about low CPU utilization as it indicates that something is not working correctly. How can I configure this?
You’re going to have to write a script in linux that runs check_nt, then performs something based on its output. This is linux, you are not restricted to pre-built binary functions.
your service definition has a new check_command:
Then heres your checkcommand:
command_line /usr/local/nagios/libexec/check_nt_load_script.sh $HOSTADDRESS$
This will run /usr/local/nagios/libexec/check_nt_load_script.sh , passing the HOSTADDRESS ip to it. This gets registered as $1 .
Heres a check_nt_load_script.sh example:
#Wild guess on the check_nt parameters needed here cause i don’t use it… modify as necessary
/usr/local/nagios/libexec/check_nt -H $1 -c load -l 1,5,6
#This is gonna throw back a return code of 0 (OK), 1 (WARNING), or 2 (CRITICAL). this return code gets thrown into the default variable called $?. We want to swap, if load is CRITICAL that is GOOD right? yeah!
if “$?” == “2” ]
echo “Load is HIGH! This is gooood!! $LOAD” | sed -e 's/CRITICAL/OK/'
echo “LOAD is too LOW! $LOAD” | sed -e 's/OK/CRITICAL/'
Something along those lines. The | sed -e is just doing a text replacement - OK with CRITICAL and vice versa. Good luck
Thank you very much!