[Nagiosplug-devel] performance data patch for check_ping.c

Christian Schneemann cschneemann at suse.de
Wed Apr 23 17:29:00 CEST 2008


On Wednesday April 23 2008 05:05:08 pm Thomas Guyot-Sionnest wrote:
> Christian Schneemann wrote:
> | Hi,
>
> Hi Christian,
>
> | it is not realy a patch, it is just one added line, but maybe it is
>
> helpfull.
>
> | I've just added a line to print the perfdata, I've tested it with Nagios
> | 3.0.1.
> |
> | --- plugins/check_ping.c
> | +++ plugins/check_ping.c
> | @@ -165,6 +165,7 @@
> |  							state_text (this_result), warn_text, pl, rta);
> |  		if (display_html == TRUE)
> |  			printf ("</A>");
> | +                printf("|rta=%2.2f;%f;%f;; pl=%d%%;%d%%;%d%%;;", rta,
>
> wrta,
>
> | crta, pl, wpl, cpl);
> |  		printf ("\n");
> |
> |  		if (verbose >= 2)
>
> Thanks for summiting a patch. Unfortunately I can't accept it as it's
> not using the perfdata functions provided y nagios plugins. This sure
> could be useful and I'll put it in my todo list. Alternatively you can
> repost your patch using the proper function (look at other plugins for
> examples).
I had a look at check_icmp, but it seems that this is not using the perdata 
functions you mention? I will have a look at other checks.

>
> It should be noted that check_icmp already provides performance data and
> should be preferred over check_ping wherever possible (it requires root
> privileges so it has to be owned by root and needs the suid permission
> bit set - might also have issues regarding ping intervals and sequence
> numbers). check_icmp has a native ICMP implementation and therefore does  
> not rely on the ping command (and does not fork anything either).
Yes, I've seen the check_icmp, but the I wanted an alternative that does not 
need root priviliges.


>
> Thanks,



-- 
Christian Schneemann

-------------------------------------
SUSE LINUX Products GmbH,
Maxfeldstr. 5, D - 90409 Nürnberg

Phone:  +49 (0)911 - 740 53 0
e-mail: cschneemann at suse.de
-------------------------------------
SUSE LINUX Products GmbH, GF: Markus Rex
HRB 16746 (AG Nürnberg)




More information about the Devel mailing list