[Nagiosplug-help] RE: [RE: [ check_nrpe plugin error => (No output returned from pl ugin)] Help needed ]

Shobhan Challa shchalla at GoRemote.com
Wed Dec 22 06:11:01 CET 2004


Hi Lawrence,

I've incorporated your changes in the config file and it works fine without
any errors.

1) I've noticed another problem. I've added two more services (total
services now:3 ) in the services.cfg as follows:


define service{
        use                             generic-service         ; Name of
service template to use
        host_name                       Linux2
        service_description             check
        check_period                    24x7
        max_check_attempts              15
        normal_check_interval           5
        retry_check_interval            1
        check_command
check_nrpe!check_disk!80%!80%!/dev/hda9
        contact_groups                  linux-admins
        notification_interval           120
        notification_period             24x7
        notification_options            c,r
        register                        1
        }
define service{
        use                             generic-service         ; Name of
service template to use
        host_name                       Linux2-0
        service_description             check-ssh
        check_period                    24x7
        max_check_attempts              15
        normal_check_interval           5
        retry_check_interval            1
        check_command                   check_nrpe!check_ssh!192.168.100.125
        contact_groups                  linux-admins
        notification_interval           120
        notification_period             24x7
        notification_options            c,r
        register                        1
        }

define service{
        use                             generic-service         ; Name of
service template to use
        host_name                       Linux2-1
        service_description             check-users
        check_period                    24x7
        max_check_attempts              15
        normal_check_interval           5
        retry_check_interval            1
        check_command                   check_nrpe!check_users!4!5
        contact_groups                  linux-admins
        notification_interval           120
        notification_period             24x7
        notification_options            c,r
        register                        1
        }

I've added the relevant host information to hosts.cfg and hostgroups.cfg and
restarted NAGIOS.

Tailing the /var/log/messages on the Nagios host shows that the nrpe client
is performing checks for "check-disk" and "check-users" services and not for
"chec-ssh" service.
Any idea why is it so..?? 

2) How do I make Nagios to check the services every 5 minutes of every 15
minutes. Currently the services are checked every 1 hour (looking at
/var/log/messages).

Regards
--Shobhan

> -----Original Message-----
 > From: nagiosplug-help-admin at li...
 > [mailto:nagiosplug-help-admin at li <mailto:nagiosplug-help-admin at li> ...]On
Behalf 
 > Of Shobhan
 > Challa
 > Sent: Tuesday, December 21, 2004 7:50 AM
 > To: nagiosplug-help at li...
 > Subject: [Nagiosplug-help] [ check_nrpe plugin error => (No output
 > returned from plugin)] Help needed
 > 
 > 
 > Hi Nagios users,
 > 
 > I have a small problem, wasn"t able to figure out where am I 
 > going wrong.
 > 
 > I have Nagios daemon/plugins on "Linux1" machine and the NRPE 
 > daemon is 
 > running on "Linux2" box.
 > 
 > The /etc/nrpe.cfg on the  Linux2 is defined as:
 > 
 >        server_port=5666
 >        allowed_hosts=192.168.100.168
 >        nrpe_user=nagios
 >        nrpe_group=nagios
 >        dont_blame_nrpe=1
 > 
 >        # DEBUGGING OPTION
 >        # This option determines whether or not debugging messages are
 >    logged to the
 >        # syslog facility.
 >        # Values: 0=debugging off, 1=debugging on
 >        debug=0
 > 
 >        # COMMAND TIMEOUT
 >        # This specifies the maximum number of seconds that the NRPE
 >    daemon will
 >        # allow plugins to finish executing before killing them off.
 >        command_timeout=60
 >        command[check_disk]=/usr/local/nagios/libexec/check_disk -w
 >    $ARG1$ -c $ARG2$ $ARG3$ $ARG4$
 > 
 > 
 > 
 > The services.cfg and checkcommands.cfg on "Linux1" are 
 > defined as below:
 > 
 >         # Generic service definition template
 > 
 >    define service{
 >            name                            generic-service ; 
 > The "name"
 >    of this service template, referenced in other service definitions
 >            active_checks_enabled           1       ; Active service
 >    checks are enabled
 >            passive_checks_enabled          1       ; Passive service
 >    checks are enabled/accepted
 >            parallelize_check               1       ; Active service
 >    checks should be parallelized (disabling this can lead to major
 >    performance problems)
 >            obsess_over_service             1       ; We should obsess
 >    over this service (if necessary)
 >            check_freshness                 0       ; Default is to NOT
 >    check service "freshness"
 >            notifications_enabled           1       ; Service
 >    notifications are enabled
 >            event_handler_enabled           1       ; Service event
 >    handler is enabled
 >            flap_detection_enabled          0       ; Flap detection is
 >    enabled
 >            process_perf_data               1       ; Process
 >    performance data
 >            retain_status_information       1       ; Retain status
 >    information across program restarts
 >            retain_nonstatus_information    1       ; Retain non-status
 >    information across program restarts
 > 
 >            register                        0       ; DONT 
 > REGISTER THIS
 >    DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
 >            }
 > 
 >    ################################## Service definition for jagadeesh
 >    system ####################################################
 >    define service{
 >            use                             generic-service         ;
 >    Name of service template to use
 >            host_name                         Linux2
 >            service_description             check
 >            check_period                     24x7
 >            max_check_attempts          15
 >            normal_check_interval       5
 >            retry_check_interval          1
 >            check_command                check_nrpe!check_disk
 
 I don"t see you passing anything but $ARG1$ here, though your command def
 specifies 4 arguments.  This would end up running:
 
 /usr/lib/nagios/plugins/check_nrpe -H 192.168.100.125 -c check_disk -a
 
 Maybe if you change the check_command to the following it will work better:
 
 check_nrpe!check_disk!80%!80%!/dev/hda9
 
 Regards,
 
 Lynne Lawrence
 >            contact_groups                  linux-admins
 >            notification_interval           120
 >            notification_period             24x7
 >            notification_options            c,r
 >            }
 > 
 > The following is defined in checkcommands.cfg:
 > 
 >    define command{
 >             command_name    check_nrpe
 >             command_line    /usr/lib/nagios/plugins/check_nrpe -H    
 > $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$
 >            }
 > 
 > 
 > Now the problem:
 > --------------------
 > When Nagios is started, I see the following message in 
 > /var/log/messages:
 > 
 >                Dec 21 14:30:27 tinderbox nagios: SERVICE ALERT: 
 > Linux2;check;UNKNOWN;SOFT;7;(No output returned from plugin)
 > 
 > I get correct output when I execute the commands from the 
 > command line, 
 > from Nagios host:
 > 
 > 1) ./check_nrpe -H 192.168.100.125 -c check_disk -a 70 70 /dev/hda7
 > 2)  ./check_nrpe -H 192.168.100.125 (outputs: NRPE v2.0)
 > 
 > The check_nrpe plugin works fine If I define the following line 
 > (hardcode) into checkcommands.cfg
 > 
 >        define command{
 >            command_name    check_nrpe
 >            command_line    /usr/lib/nagios/plugins/check_nrpe -H  
 > 192.168.100.125 -c check_disk -a 80% 80% /dev/hda9
 >        }
 > 
 > Can anyone tell me what mistake I"m doing. Why is it not 
 > working without 
 > any hardcoding.
 > 
 > 
 > Thanks for your time in advance
 > Shobhan






More information about the Help mailing list