problem with using check_log on a remote server

subhadeep.das at philips.com subhadeep.das at philips.com
Tue Nov 23 13:13:52 CET 2004


Hello everyone,

I am having some problems to use the check_log plugin on a remote server 
to watch for pattern changes in the logfiles. I have 2 PC's, PCL38 running 
fedora core 2 linux whereas i have another Sun System which is SUN275. I 
have installed the NRPE plugin on both and i have been running multiple 
services with the plugin. My pcl38 is the terminal i use through which i 
monitor sun 275. I am getting the status problem of Return Code of 32 is 
out of bounds whenever i try to use check_log with sun275 although 
everything works allright with pcl38.

# services.cfg
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Service definition
define service{
        use                             generic-service         ; Name of 
service template to use

        host_name                       pcl38
        service_description             pcl38 log
        is_volatile                     0
        check_period                    24x5
        max_check_attempts              1
        normal_check_interval   10
        retry_check_interval            1
        contact_groups          Linux-admins,Window-admins
        notification_interval           120
        notification_period             24x5
        notification_options            w,u,c,r
        check_command           check_nrpe!check_logpcl38
        }

# checkcommands.cfg
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# 'check_log' command definition
define command{
        command_name    check_logpcl38
        command_line    $USER1$/check_log -F /var/log/messages -O 
/var/log/nagioslog/messages -q Error
        }

On nrpe.cfg
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

command[check_logpcl38]=/users/stage/frq03383/nagios/libexec/check_log  -F 
/var/log/messages -O /var/log/nagioslog/messages -q Error

This thing works fine, at the first time all my logs from 
/var/log/messages were copied to /var/log/nagioslog/messages and then the 
plugin checks for pattern match between the 2 messages and gives me an 
alert. There is no problems with this on pcl38.

however, i have the following problem on sun275

On the nagios console i get the status as : ( Return code of 32 is out of 
Bounds)

The check_log plugin does not seem to work. My configuration is as follws:

# services.cfg
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Service definition
define service{
        use                             generic-service         ; Name of 
service template to use

        host_name                       Sun275
        service_description             Sun275 log
        is_volatile                     0
        check_period                    24x5
        max_check_attempts      1
        normal_check_interval   10
        retry_check_interval            1
        contact_groups          Linux-admins,Window-admins
        notification_interval           120
        notification_period     24x5
        notification_options            w,u,c,r
        check_command           check_nrpe!check_log275
        }

# checkcommands.cfg
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# 'check_log' command definition
define command{
        command_name    check_log275
        command_line    $USER1$/check_log -F /var/adm/messages -O 
/users/stage/frq03383/nagioslog/sun275/messages -q Error
                }


nrpe.cfg
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

command[check_logpcl38]=/usr/local/nagios/libexec/check_log  -F 
/var/adm/messages -O /users/stage/frq03383/nagioslog/sun275/messages -q 
Error

so this is it, one works the other doesn't particularly the remote server 
, what am i doing wrong and what does that return code of 32 means, couls 
someone please help me out.

thanks,
Subhadeep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20041123/d32a19b0/attachment.html>


More information about the Users mailing list