Page 1 of 1

Not receiving notification from check_logfiles

Posted: Thu Nov 13, 2014 1:53 pm
by tgfde
Hello,

I can see that Nagios is detecting the string specified in the config file on check_logfiles plug-in, but it's not sending a notification. Could it be because the output (below) is too long?

Nov 13 11:43:02 nagios: SERVICE ALERT: {host};Check_LogFiles;CRITICAL;SOFT;1;CRITICAL - (1 errors in check_logfiles.protocol-2014-11-13-11-42-44) - java.lang.IllegalStateException: Environment vairable ORACLE_HOME or oracle.home is null.

This output is taken directly from the Nagios server log, /var/log/messages. Please advise.

Thanks in advance.

Re: Not receiving notification from check_logfiles

Posted: Thu Nov 13, 2014 1:56 pm
by tgfde
Here's the config file utilized by the 'check_logfiles' plug-in.

$seekfilesdir = 'C:\Program Files\NSClient++\scripts\check_logfiles\tmp';

@searches = ({
tag => 'Deploy Error',
logfile => 'D:\logs\wc\dev2external\ms1\ms1.log',
criticalpatterns => [
'java.lang.IllegalStateException'
],
criticalthreshold => '2',
options => 'nosavethresholdcount,maxlength=512',

});

Thanks.

Re: Not receiving notification from check_logfiles

Posted: Thu Nov 13, 2014 2:06 pm
by tgfde
We are currently using xi 2014r1.1 on a virtual server (VM).

Thanks,
Frederick

Re: Not receiving notification from check_logfiles

Posted: Thu Nov 13, 2014 5:04 pm
by sreinhardt
Are you attempting to use nsclient to check a windows log file or event log? I would also note, that your service is in a soft critical state. This means that it has not completed the number of retry checks for it to be moved to a hard(stable). Nagios will also not send out a notification until this hard state has been met, unless you have is_volatile set within that host or service's configs.

Re: Not receiving notification from check_logfiles

Posted: Fri Nov 14, 2014 10:00 am
by tgfde
Yes, I am monintoring a log file in Windows.

Thank you for you help. I changed the value for Max.check attempts from 3 to 1 in Nagios. Please mark this request as complete if what I did would fix the issue.

Thanks again - tgfde

Re: Not receiving notification from check_logfiles

Posted: Fri Nov 14, 2014 10:29 am
by tmcdonald
If you want to get alerted right away on the first critical, then yes that should work. We can keep the thread open if you'd like while you test.

Re: Not receiving notification from check_logfiles

Posted: Mon Dec 29, 2014 11:58 am
by tgfde
Please close this thread - I got it working.

Thank you so much!

-tgfde

Re: Not receiving notification from check_logfiles

Posted: Mon Dec 29, 2014 12:16 pm
by cmerchant
Ok. We'll go ahead and close this thread. Thanks.