ping plugin - no output

James Green james.green at stealthnet.net
Tue Sep 21 19:32:31 CEST 2004


Hi

Due to one of my machines bizarrely giving weird error messages at random:

jmkg at m1:/etc/nagios$ ping xxx.xxx.xxx.xxx
PING xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) from xxx.xxx.xxx.xxx : 56(84) 
bytes of data.
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=1 ttl=254 time=0.412 ms
WARNING: failed to install socket filter
: Protocol not available
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=2 ttl=254 time=0.258 ms
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=3 ttl=254 time=0.314 ms
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=4 ttl=254 time=0.370 ms
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=5 ttl=254 time=0.301 ms

--- xxx.xxx.xxx.xxx ping statistics ---
5 packets transmitted, 5 received, 0% loss, time 4047ms
rtt min/avg/max/mdev = 0.258/0.331/0.412/0.054 ms

I built a simple wrapper script, thus:

#!/bin/bash

output=`$1|tail -1`
echo $output

Which works rather well at the command line:

jmkg at m1:/etc/nagios$ /opt/nagios/libexec/check_ping_stealthnet 
'/opt/nagios/libexec/check_ping -H xxx.xxx.xxx.xxx  -w 10,10% -c 20,20% 
-p 10'
Packet loss = 0%, RTA = 0.34 ms

And within the checkcommands.cfg:

define command {
        command_name            check_ping_int
        command_line            
/opt/nagios/libexec/check_ping_stealthnet 
'/opt/nagios/libexec/check_ping -H $ARG3$  -w $ARG1$ -c $ARG2 -p 10'
        }

Yet within nagios it reports a critical situation, with "No output!" as 
the result.

I have no idea why. Can anyone offer some advice please?

Many thanks!

-- 
James Green
Systems Administrator, StealthNET Ltd, www.stealthnet.co.uk
Tel: 0870 800 1777 Intl: +44 1493 660066 Fax: 0870 135 1069



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
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