make sure to run the test from the command line then check the return code
/checkncnet -H xx.xx.xx.xx -v EVENTLOG_NEW -l "System^Error^60^^1-1110,1112-99999^" -t 25 -w 1 -c 2
/echo $?
I hope the result comes back as 1 for warning if the Output says 1 Event found.
On 2 or more events found I would expect a critical of 2.
also on reversing the -w 2 -c 1 I would expect a 1 to be critical and a 2 to be Warning, and greater than 2 OK,
The source code for this calculation is in CHeck_nc_net so it is easier to patch if it is misfiring.
Tony
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looks like it's working ok in Nagios itself…Apparently I fooled myself into thinking I'd changed the check to have the warning and critical settings, but I hadn't actually made the change.
Sorry about that…thanks very much for the help :)
Joe
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here's what I put in as the command…
/check_nc_net -H xx.xx.xx.xx -v EVENTLOG_NEW -l "System^Error^60^^1-1110,1112-99999^" -t 25 -w 1 -c 2
And there's the response…
1 Events found, EventID: 5722
Nagios is reporting this back as a critical event. Am I getting the syntax wrong? or am I missing something else?
Thanks
Joe
Hi Joe,
make sure to run the test from the command line then check the return code
/checkncnet -H xx.xx.xx.xx -v EVENTLOG_NEW -l "System^Error^60^^1-1110,1112-99999^" -t 25 -w 1 -c 2
/echo $?
I hope the result comes back as 1 for warning if the Output says 1 Event found.
On 2 or more events found I would expect a critical of 2.
also on reversing the -w 2 -c 1 I would expect a 1 to be critical and a 2 to be Warning, and greater than 2 OK,
The source code for this calculation is in CHeck_nc_net so it is easier to patch if it is misfiring.
Tony
Hi Tony,
Looks like it's working ok in Nagios itself…Apparently I fooled myself into thinking I'd changed the check to have the warning and critical settings, but I hadn't actually made the change.
Sorry about that…thanks very much for the help :)
Joe