Not receiving notification from check_logfiles

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

Not receiving notification from check_logfiles

Post 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.
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

Re: Not receiving notification from check_logfiles

Post 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.
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

Re: Not receiving notification from check_logfiles

Post by tgfde »

We are currently using xi 2014r1.1 on a virtual server (VM).

Thanks,
Frederick
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Not receiving notification from check_logfiles

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

Re: Not receiving notification from check_logfiles

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Not receiving notification from check_logfiles

Post 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.
Former Nagios employee
tgfde
Posts: 233
Joined: Thu May 12, 2011 7:55 am

Re: Not receiving notification from check_logfiles

Post by tgfde »

Please close this thread - I got it working.

Thank you so much!

-tgfde
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Not receiving notification from check_logfiles

Post by cmerchant »

Ok. We'll go ahead and close this thread. Thanks.
Locked