From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001
From: Holger Weiss <holger@zedat.fu-berlin.de>
Date: Mon, 30 Sep 2013 00:03:24 +0200
Subject: Import Nagios Plugins site

Import the Nagios Plugins web site, Cronjobs, infrastructure scripts,
and configuration files.
---
 web/attachments/430613-check_fping.c_patch | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 web/attachments/430613-check_fping.c_patch

(limited to 'web/attachments/430613-check_fping.c_patch')

diff --git a/web/attachments/430613-check_fping.c_patch b/web/attachments/430613-check_fping.c_patch
new file mode 100644
index 0000000..4c661a8
--- /dev/null
+++ b/web/attachments/430613-check_fping.c_patch
@@ -0,0 +1,28 @@
+68d67
+< int alive_p = FALSE;
+154,166d152
+<   if (alive_p && strstr (buf, "avg, 0% loss)")){
+<     rtastr = strstr (buf, "ms (");
+<     rtastr = 1 + index (rtastr, '(');
+<     rta = strtod (rtastr, NULL);
+<     loss=strtod ("0",NULL);
+<     die (STATE_OK,
+<          _("FPING %s - %s (rta=%f ms)|%s %s\n"),
+<          state_text (STATE_OK), server_name,rta,
+<          perfdata ("loss", (long int)loss, "%", wpl_p, wpl, cpl_p, cpl, TRUE, 0, TRUE, 100),
+<          fperfdata ("rta", rta/1.0e3, "s", wrta_p, wrta/1.0e3, crta_p, crta/1.0e3, TRUE, 0, FALSE, 0));
+< 
+<   }
+< 
+275c261
+<     c = getopt_long (argc, argv, "+hVvaH:c:w:b:n:T:i:", longopts, &option);
+---
+>     c = getopt_long (argc, argv, "+hVvH:c:w:b:n:T:i:", longopts, &option);
+292,294d277
+<     case 'a':                 /* host alive mode */
+<       alive_p = TRUE;
+<       break;
+436,438d418
+<   printf (" %s\n", "-a");
+<   printf ("    %s\n", _("Return OK after first successfull reply"));
+< 
-- 
cgit v1.2.3-74-g34f1