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

Thomas Guyot-Sionnest thomas at zango.com
Fri May 16 21:58:28 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christian Schneemann wrote:
| 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?

Yes, rev 1990.

Meanwhile you can get the snapshots...

http://nagiosplug.sourceforge.net/snapshot

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFILedj6dZ+Kt5BchYRAuDBAJoCKWcYQ60XUn0uamfTSBe+GYdZ1QCgrVvH
pgyehI0iCp5E2N0jUD5Gl1M=
=cVJc
-----END PGP SIGNATURE-----




More information about the Devel mailing list