Page 1 of 1

Issue when configuring check_logfiles

Posted: Fri Jan 11, 2019 3:59 pm
by MattSmith46
Hello,

I am trying to setup the check_logfile on one of my servers.

I've configured the latest plugin from https://labs.consol.de/nagios/check_logfiles/ and tested the check_logfile plugin via the command line and received the following.
> ./check_logfiles --criticalpattern='ORA' --logfile=/srv/oracle/adm/QSYS566P/logging/MQIST.log
OK - no errors or warnings|'default_lines'=0 'default_warnings'=0 'default_criticals'=0 'default_unknowns'=0
but after I setup the check_logfiles.cfg file and try to run it from the command line I get the following error.
> ./check_logfiles -f /usr/local/nagios/etc/check_logfiles.cfg
UNKNOWN - syntax error syntax error at /usr/local/nagios/etc/check_logfiles.cfg line 4, near "logfile"
Here what it look like in the .cfg file look like.

Code: Select all

@searches = (
{
 tag => 'ORA'
 logfile => '/srv/oracle/adm/QSYS566P/logging/MQIST.log',
 criticalpatterns => ['ORA']
}
)
;
Could anyone point me in the right direction on what I'm doing wrong?

Thanks,

Re: Issue when configuring check_logfiles

Posted: Fri Jan 11, 2019 4:13 pm
by scottwilkerson
Looking at the example on their page I think it should look like this (missing comma)

Code: Select all

@searches = (
{
tag => 'ORA',
logfile => '/srv/oracle/adm/QSYS566P/logging/MQIST.log',
criticalpatterns => ['ORA']
},
);

Re: Issue when configuring check_logfiles

Posted: Tue Jan 15, 2019 11:43 am
by MattSmith46
Thank your help scottwilkerson all is working now! I see I forgot the , at the end. ;)

Re: Issue when configuring check_logfiles

Posted: Tue Jan 15, 2019 12:15 pm
by scottwilkerson
great!

Locking thread