Menu

EVENTLOG_NEW -w and -c aren't working f...

Help
Joe Norman
2009-11-05
2013-04-25
  • Joe Norman

    Joe Norman - 2009-11-05

    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

     
  • tony

    tony - 2009-11-06

    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

     
  • Joe Norman

    Joe Norman - 2009-11-06

    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

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.