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.
Not receiving notification from check_logfiles
Re: Not receiving notification from check_logfiles
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.
$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
We are currently using xi 2014r1.1 on a virtual server (VM).
Thanks,
Frederick
Thanks,
Frederick
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Not receiving notification from check_logfiles
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.
Re: Not receiving notification from check_logfiles
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
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
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
Re: Not receiving notification from check_logfiles
Please close this thread - I got it working.
Thank you so much!
-tgfde
Thank you so much!
-tgfde
Re: Not receiving notification from check_logfiles
Ok. We'll go ahead and close this thread. Thanks.