check_ping unknown

Schmitz, Carsten Carsten.Schmitz at aegon.com
Tue Jan 18 15:18:30 CET 2005


>     command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c

Hm okay so you use the plugin. Then I'm puzzled ... sorry, don't have an answer.


> I execute the command on a shell with root and I can ping. I don't 

Rule of thumb: Always run the commands as the user who runs Nagios (and that shouldn't be root for security reasons). This may not help you with the ping problem, but if you use the shell to see if the commands work or not, using the Nagios user ensures that you have the same permissions etc.  It can be frustrating to find that a command worked for root but failed for Nagios due to permissions (I speak from experience here ;)

Cheers
Carsten


-----Original Message-----
From: Ovig Degrouard [mailto:ovig.degrouard at jouy.inra.fr]
Sent: Tuesday, January 18, 2005 2:44 PM
To: Schmitz, Carsten
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] check_ping unknown


Schmitz, Carsten wrote:

>Hi,
>
>Please post your checkcommands.cfg entry on check_ping, too.
>  
>
This is the lines about check_ping in checkcommands.cfg

# 'check_ping' command definition
define command{
    command_name    check_ping
    command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c 
$ARG2$ -p 5
    }

>Are you using /bin/ping from checkcommands.cfg instead of the check_ping or check_icmp plugins? If yes, any specific reason?
>  
>
I don't know which method I'm using to ping. I only know that service 
detail print this message: Connectivity : UNKNOWN 01-18-2005 09:54:16 0d 
20h 41m 39s 1/3 /bin/ping -n -U -w 10 -c 5 138.122.22.222

>I dunno, could be that the combination of -w 10 and -c 5 makes Nagios think there's a timeout before your ping command finishes? Did you try lower values? When you say the command works on the shell, did you do that as the same user that Nagios runs as?
>  
>
I execute the command on a shell with root and I can ping. I don't 
understand why Nagios couldn't give me the OK status.




>Cheers
>Carsten
>
>-----Original Message-----
>From: nagios-users-admin at lists.sourceforge.net
>[mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of Ovig
>Degrouard
>Sent: Tuesday, January 18, 2005 10:11 AM
>To: nagios-users at lists.sourceforge.net
>Subject: [Nagios-users] check_ping unknown
>
>
>Hello,
>
>
>I have this message in service detail.
>Connectivity : UNKNOWN 01-18-2005 09:54:16 0d 20h 41m 39s 1/3 /bin/ping 
>-n -U -w 10 -c 5 138.122.22.222
>
>
>This is my file services.cfg
>define service {
>    use                                    generic-service
>    hostgroup_name                localhost-servers
>    service_description            Connectivity
>    is_volatile                            0
>    check_period                       24x7
>    max_check_attempts           3
>    normal_check_interval        5
>    retry_check_interval            1
>    contact_groups                    localhost-admins
>    notification_interval            120
>    notification_period            24x7
>    notification_options            c,r
>    check_command                check_ping!100.0,20%!500.0,60%
>}
>
>I don't understand because the command /bin/ping -n -U -w 10 -c 5 
>138.122.22.222 works but Nagios shows an unknown status.
>
>
>Thank you,
>O. Degrouard
>
>
>
>-------------------------------------------------------
>The SF.Net email is sponsored by: Beat the post-holiday blues
>Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
>It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
>_______________________________________________
>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
>
>
>  
>



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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