summaryrefslogtreecommitdiffstats
path: root/web/attachments/430613-check_fping.c_patch
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
commit0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch)
tree1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/430613-check_fping.c_patch
downloadsite-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files.
Diffstat (limited to 'web/attachments/430613-check_fping.c_patch')
-rw-r--r--web/attachments/430613-check_fping.c_patch28
1 files changed, 28 insertions, 0 deletions
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 @@
168d67
2< int alive_p = FALSE;
3154,166d152
4< if (alive_p && strstr (buf, "avg, 0% loss)")){
5< rtastr = strstr (buf, "ms (");
6< rtastr = 1 + index (rtastr, '(');
7< rta = strtod (rtastr, NULL);
8< loss=strtod ("0",NULL);
9< die (STATE_OK,
10< _("FPING %s - %s (rta=%f ms)|%s %s\n"),
11< state_text (STATE_OK), server_name,rta,
12< perfdata ("loss", (long int)loss, "%", wpl_p, wpl, cpl_p, cpl, TRUE, 0, TRUE, 100),
13< fperfdata ("rta", rta/1.0e3, "s", wrta_p, wrta/1.0e3, crta_p, crta/1.0e3, TRUE, 0, FALSE, 0));
14<
15< }
16<
17275c261
18< c = getopt_long (argc, argv, "+hVvaH:c:w:b:n:T:i:", longopts, &option);
19---
20> c = getopt_long (argc, argv, "+hVvH:c:w:b:n:T:i:", longopts, &option);
21292,294d277
22< case 'a': /* host alive mode */
23< alive_p = TRUE;
24< break;
25436,438d418
26< printf (" %s\n", "-a");
27< printf (" %s\n", _("Return OK after first successfull reply"));
28<