Problem with check_by_ssh

mirko stefanelli mirko.stefanelli at gmail.com
Fri Feb 5 16:42:17 CET 2010


Hi,

yes if I doing it from the CLI as Nagios User is work fine.

Here:

Command definition:

# 'check_tablespace' command definition_
define command{
        command_name    check_tablespace
        command_line    $USER1$/check_by_ssh -H $HOSTADDRESS$ -C
"/usr/local/nagios/libexec/check_tablespace $ARG1$ $ARG2$ $ARG3$ $ARG4$"


Host definition:

define host{
        use                     linux-server            ; Name of host
template to use
                                                        ; This host
definition will inherit all variables that are defined
                                                        ; in (or inherited
by) the linux-server host template definition.
        host_name               siper_afr
        alias                   siper_afr
        address                 10.5.3.xxx
        parents                 routerIperAfr
        }

service definition:

define service{
        use                             local-service         ; Name of
service template to use
        host_name                       siper_afr
        service_description             tablespace
        check_command
check_tablespace!siper!<user>!<passwd>!89
        notifications_enabled           0
        }

Service template definition:

# Local service definition template - This is NOT a real service, just a
template!

define service{
        name                            local-service           ; The name
of this service template
        use                             generic-service         ; Inherit
default values from the generic-service definition
        max_check_attempts              4                       ; Re-check
the service up to 4 times in order to determine its final (hard) state
        normal_check_interval           5                       ; Check the
service every 5 minutes under normal conditions
        retry_check_interval            1                       ; Re-check
the service every minute until a hard state can be determined
        register                        0                       ; DONT
REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
        }

thank in advance,
Mirko.

2010/2/5 Sean McAfee <smcafee at collaborativefusion.com>

> mirko stefanelli wrote:
>
>> Hi to all,
>>
>> We run nagios on Ubuntu server with 2Gb ramm kernel version
>>  2.6.24-23-server. Nagios version is 3.2.0.
>>
>> We have configured all our server (Linux REL) to execute our custom plugin
>> by check_by_ssh. The problem is that for some server this check fails and
>> the output is:
>>
>> CRITICAL - Plugin timed out while executing system call
>>
>> If we try to do same command, executed with check_by_shh, from user nagios
>> on cli the command work fine!
>>
>> Any idea?
>>
>> Regards,
>> Mirko.
>>
>
> Doing it on the CLI as the Nagios user was the right first step.
>
> Could you send your command definition, host definition, service
> definition, and any templates used?  It's very hard to troubleshoot without
> those.
>
> --
> Sean McAfee
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100205/3c64fa62/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list