Page 1 of 1

Check_logfile help

Posted: Wed Jan 30, 2019 1:22 pm
by MattSmith46
Hello,

I've installed and implement the check_logfile plugin, but I am having issue with the .cfg file. The logfile I want to monitor is MQIST.log and I would like it to alert when this error is generated in the log file "[ERR-04704] No inspection step found"
Here is my current .cfg file:

Code: Select all

@searches = (
{
tag => 'ERR-04704',
logfile => '/srv/oracle/adm/QSYS566P/logging/MQIST.log',
criticalpatterns => [ 'ERR-04704 No inspection step found']
},
);
Currently if I leave it configured this way I get multiple alerts from whenever the word error or anything in that string is generated in the log file. Also if if I try to put the [] around ERR-04704 I get an error. Could someone help me so that it alerts on the correct message.

Thanks
Matt

Re: Check_logfile help

Posted: Wed Jan 30, 2019 1:29 pm
by scottwilkerson
you may need to escape the [] and add them back in there, like

Code: Select all

criticalpatterns => ['\[ERR-04704\] No inspection step found']
or possibly with double quotes

Code: Select all

criticalpatterns => ["\[ERR-04704\] No inspection step found"]
I'm not 100% sure as we are not the developers of this plugin

Re: Check_logfile help

Posted: Thu Jan 31, 2019 10:45 am
by MattSmith46
Thank you Scott this is the one that worked.

Code: Select all

criticalpatterns => ['\[ERR-04704\] No inspection step found']

Re: Check_logfile help

Posted: Thu Jan 31, 2019 10:48 am
by scottwilkerson
MattSmith46 wrote:Thank you Scott this is the one that worked.

Code: Select all

criticalpatterns => ['\[ERR-04704\] No inspection step found']
Excellent! Glad it is resolved!

Locking thread