ping output error in 1.4a plugins in Fedora Core 2

Ricardo David Martins ricardo.martins at gmail.com
Thu Sep 9 13:17:54 CEST 2004


Hi,

i wasn't clear enough. The problem is in check_ping.c all along.
The perms issue is no issue because i can ping if I "su - nagios" and also if i
make the check_ping as root It will give me the exact same error. 

To enlighten any doubts i will show some tests....

[root at seeker check_icmp-0.8.1]# cp
/usr/local/nagios-plugins-1.3.1/plugins/check_ping
/usr/local/nagios/libexec/
cp: overwrite `/usr/local/nagios/libexec/check_ping'? y
[root at seeker check_icmp-0.8.1]# sudo -u nagios
/usr/local/nagios/libexec/check_ping -H localhost -w 600.0,100% -c
800.0,100% -p 5
PING OK - Packet loss = 0%, RTA = 0.06 ms

[root at seeker check_icmp-0.8.1]# cp
/usr/local/nagios-plugins-1.4.0alpha1/plugins/check_ping
/usr/local/nagios/libexec/
cp: overwrite `/usr/local/nagios/libexec/check_ping'? y
[root at seeker check_icmp-0.8.1]# sudo -u nagios
/usr/local/nagios/libexec/check_ping -H localhost -w 600.0,100% -c
800.0,100% -p 5
/bin/ping -n -U -c 5 localhost
Error: Could not interpret output from ping command

[root at seeker check_icmp-0.8.1]# sudo -u nagios
/tmp/check_icmp-0.8.1/check_icmp -H localhost
Root access needed (for raw sockets)
[root at seeker check_icmp-0.8.1]# ./check_icmp -H localhost
OK - localhost: rta 0.06 ms, lost 0%|rta=0.06ms;200;500;; pl=0%;60;80;;
[root at seeker check_icmp-0.8.1]#


Dan Stromberg i tried all your patches but they seem not to match correctly...

[root at seeker plugins]# patch < patch_ping_2
(Patch is indented 1 space.)
patching file check_ping.c
Hunk #1 succeeded at 495 with fuzz 2 (offset 107 lines).
missing header for unified diff at line 22 of patch
(Patch is indented 1 space.)
can't find file to patch at input line 22
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|received, +%*d errors, %d%%
|packet loss",
--------------------------
File to patch: check_ping.c
patching file check_ping.c
patch: **** malformed patch at line 25: %d%% loss, time", &pl) == 1

In conclusion, check_ping of 1.3.1 works but 1.4a doesn't, on FC2. 
Dan i was unable to aply your patches.
Marc it's not a permissions issue.

Many thanks,

-- 
Ricardo David Martins


On Wed, 8 Sep 2004 19:47:11 -0500, Marc Powell <marc at ena.com> wrote:
> 
> 
> > -----Original Message-----
> > From: Ricardo David Martins [mailto:ricardo.martins at gmail.com]
> > Sent: Wednesday, September 08, 2004 2:00 PM
> > To: nagios-users at lists.sourceforge.net
> > Subject: [Nagios-users] ping output error in 1.4a plugins in Fedora
> Core 2
> >
> > Hi,
> >
> > i am having problems with ping output on a fedora core 2 platform.
> > It gives me unknown state for check_ping service because its answer is
> > /bin/ping -n U -c 5 xx.xx.xx.xx . Of course its 1.4a plugins (in 1.2
> > with perf data).
> >
> > I have the same thing on Arch Linux and everything works great.
> >
> > I bet this is a bug. I've seen some posts but no real answer to this.
> > How can i fix this?
> 
> 
> I would be surprised if /bin/ping was executable by the nagios user. You
> probably need to:
> 
> chmod u+s /bin/ping
> chmod 755 /bin/ping
> 
> This is almost always the reason.
> 
> --
> Marc
> 
>


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
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