You are here

Trying to get check_logfiles working.

1 post / 0 new
bbart1968
bbart1968's picture
Trying to get check_logfiles working.

Im stumped.

Im installing the check_logfiles plugin. Using Core 3.20131016.0

I think I have it installed properly. When running the check locally it runs fine on both the opsview server and the remote server.

When i run this locally i get this
OPSVIEW server
[nagios@CentOS31 libexec]$ ./check_logfiles --logfile=log.log --warningpattern=error
OK - no errors or warnings|default_lines=0 default_warnings=0 default_criticals=0 default_unknowns=0

Target server
nagios@nagiostargettest:/usr/local/nagios/libexec> ./check_logfiles --logfile=log.log --warningpattern=error
OK - no errors or warnings|default_lines=0 default_warnings=0 default_criticals=0 default_unknowns=0

I want to run this through nrpe however I get an error message that says  NRPE: Command 'check_logfiles' not defined
 
I have followed the directions from the forums http://www.opsview.com/forum/opsview-community-edition/how-do-i/how-do-i...
 
created on the remote server the following file /usr/local/nagios/etc/nrpe_local/local.cfg
with the line command[check_logfiles]=/usr/local/nagios/libexec/check_logfiles $ARG1$

On the opsview server i get a not defined message.

using check_nrpe -H $HOSTADDRESS$ -c check_logfiles -a '--logfiles=/usr/local/nagios/libexec/log.log --warningpattern=error'
$ /usr/local/nagios/libexec/check_nrpe -H XXX.XXX.XXX.XXX -c check_logfiles -a '--logfiles=/usr/local/nagios/libexec/log.log --warningpattern=error'
RETURN CODE: 2 (CRITICAL)
OUTPUT:
 NRPE: Command 'check_logfiles' not defined

On the opsview server i have the following line in checkcommands.cfg

define command {
        command_name    check_logfiles
        command_line    /usr/local/nagios/libexec/check_logfiles $ARG1$
}

 What am I missing? Thanks for your help.