I have a problem with the command-definition of "negate".
When I execute negate on localhost, then it works:
/usr/local/nagios/libexec # ./check_file_age -C 3000000 -f /var/log/messages
FILE_AGE OK: /var/log/messages is 15 seconds old and 3558401 bytes
# echo $?
usr/local/nagios/libexec# ./negate /usr/local/nagios/libexec/check_file_age -C 3000000 -f /var/log/messages
FILE_AGE OK: /var/log/messages is 20 seconds old and 3558401 bytes
/usr/local/nagios/libexec # echo $?
I want to check the messageslog on the nagios-server. check_file_age gives a OK-return, when the size of a file is less than the Critical-size of 3000000 Byte.
But I want to reverse that, so that I get a OK-return ,when thi file-size is under 3000000Byte limit.
My service- and command- definition:
service_description Check messages-log
command_line $USER1$/nagate $USER1$/check_file_age -C 3000000 -f /var/log/messages
But when I use nagate in my command definition, then I get a warning like:
Warning: Return code of 127 for check of service 'Check messages-logs' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.
Do you have a solution for me?