summaryrefslogtreecommitdiffstats
path: root/web/attachments/430613-check_fping.c_patch
diff options
context:
space:
mode:
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<