Issue when configuring check_logfiles

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
MattSmith46
Posts: 4
Joined: Tue Dec 19, 2017 4:38 pm

Issue when configuring check_logfiles

Post 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,
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue when configuring check_logfiles

Post 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']
},
);
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
MattSmith46
Posts: 4
Joined: Tue Dec 19, 2017 4:38 pm

Re: Issue when configuring check_logfiles

Post by MattSmith46 »

Thank your help scottwilkerson all is working now! I see I forgot the , at the end. ;)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue when configuring check_logfiles

Post by scottwilkerson »

great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked