Plugin to monitor error messages in a log file for windows s

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tchandra
Posts: 38
Joined: Fri Oct 18, 2019 5:53 am

Plugin to monitor error messages in a log file for windows s

Post by tchandra »

Team,

we have a task to monitor error messages in a log file for a application server.
we tried with check_log files plugin and it showing the output OK - no errors or warnings.
But user is saying that jobs failed and threw the error.when we checked the file & found error messages , but Nagios didn't checked the error pattern and still showing status as OK.
can someone please suggest on this

Command defined in custom file :

check_logfiles_AcurityCmore=scripts\check_logfiles.exe --f scripts\etc\check_logfiles.cfg --searches=AcurityCmore

Script :

$seekfilesdir = 'C:\Program Files\NSClient\scripts\var';
$protocolsdir = 'C:\Program Files\NSClient\scripts\var';

$MACROS = { LOGDIR => 'D:\AcurityCmore-JobServer\logs' };
@searches = ({
tag => 'AcurityCmore',
logfile => '$LOGDIR$\service-runner.err.txt',
criticalpatterns => ['AcurityServerDaemonException:','SQLServerException: The connection is closed.'],
options => 'nologfilenocry',
}
);


Thanks in advance.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Plugin to monitor error messages in a log file for windo

Post by cdienger »

Has this worked previously? My first thought is that the pattern isn't matching, but we would need to see an example of service-runner.err.txt to test that.

Another possibility is that it did work initially, but then subsequent checks would have not returned CRITICAL since the plugin monitors the file and will only scan new log entries on subsequent check attempts.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tchandra
Posts: 38
Joined: Fri Oct 18, 2019 5:53 am

Re: Plugin to monitor error messages in a log file for windo

Post by tchandra »

Hi cdienger ,

Thanks for your response.
Anyhow issue got fixed , after editing the script.
Previously, It is checking new entries only.

Regards,
Chandra
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Plugin to monitor error messages in a log file for windo

Post by cdienger »

Thanks for the update!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked