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

Christian Schneemann cschneemann at suse.de
Fri May 16 19:36:05 CEST 2008


Am Mittwoch 07 Mai 2008 schrieb Thomas Guyot-Sionnest:
> On 06/05/08 10:58 AM, Christian Schneemann wrote:
> > On Wednesday April 23 2008 08:36:18 pm Thomas Guyot-Sionnest wrote:
> >> Christian Schneemann wrote:
> >
> > [...]
> >
> >> Thanks for your time,
> >
> > Hi,
> > thanks for the small documentation, I gave it a new try ;)
> >
> > With the test if the threshold is set and with packetloss.
> >
> > --- plugins/check_ping.c
> > +++ plugins/check_ping.c
> > @@ -165,7 +165,11 @@
> >  							state_text (this_result), warn_text, pl, rta);
> >  		if (display_html == TRUE)
> >  			printf ("</A>");
> > -		printf ("\n");
> > +		char * data_rta = NULL;
> > +		char * data_pl = NULL;
> > +		asprintf(&data_rta, "%s", fperfdata ("rta", (double) rta, "ms",
> > wrta>0?TRUE:FALSE, wrta, crta>0?TRUE:FALSE, crta, TRUE, 0, FALSE, 0));
> > +		asprintf(&data_pl, "%s", perfdata ("pl", (long) pl, "%",
> > wpl>0?TRUE:FALSE, wpl, cpl>0?TRUE:FALSE, cpl, FALSE, 0, FALSE, 0));
> > +		printf("|%s %s\n",data_rta, data_pl);
> >
> >  		if (verbose >= 2)
> >  			printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl);
>
> Thank you. I will commit that to svn.
Thanks, will it be in the next release?

Greetings,
	Christian
>
> Thomas
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/java
>one _______________________________________________________
> Nagios Plugin Development Mailing List
> Nagiosplug-devel at lists.sourceforge.net Unsubscribe at
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
>
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
-- 
-------------------------------------
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