From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss 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. --- ...agios-plugins-1.4.11-check_http-sizecheck.patch | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 web/attachments/261480-nagios-plugins-1.4.11-check_http-sizecheck.patch (limited to 'web/attachments/261480-nagios-plugins-1.4.11-check_http-sizecheck.patch') diff --git a/web/attachments/261480-nagios-plugins-1.4.11-check_http-sizecheck.patch b/web/attachments/261480-nagios-plugins-1.4.11-check_http-sizecheck.patch new file mode 100644 index 0000000..e6831d9 --- /dev/null +++ b/web/attachments/261480-nagios-plugins-1.4.11-check_http-sizecheck.patch @@ -0,0 +1,34 @@ +--- check_http.c (revision 1904) ++++ check_http.c (working copy) +@@ -961,14 +961,7 @@ + /* these checks should be last */ + + if (strlen (string_expect)) { +- if (strstr (page, string_expect)) { +- printf (_("HTTP OK %s - %.3f second response time %s|%s %s\n"), +- status_line, elapsed_time, +- (display_html ? "" : ""), +- perfd_time (elapsed_time), perfd_size (pagesize)); +- exit (STATE_OK); +- } +- else { ++ if (!strstr (page, string_expect)) { + printf (_("HTTP CRITICAL - string not found%s|%s %s\n"), + (display_html ? "" : ""), + perfd_time (elapsed_time), perfd_size (pagesize)); +@@ -979,11 +972,10 @@ + if (strlen (regexp)) { + errcode = regexec (&preg, page, REGS, pmatch, 0); + if ((errcode == 0 && invert_regex == 0) || (errcode == REG_NOMATCH && invert_regex == 1)) { +- printf (_("HTTP OK %s - %.3f second response time %s|%s %s\n"), +- status_line, elapsed_time, +- (display_html ? "" : ""), +- perfd_time (elapsed_time), perfd_size (pagesize)); +- exit (STATE_OK); ++ /* ++ Success, i.e. don't do anything here -- let the final success ++ handler take care of it. ++ */ + } + else if ((errcode == REG_NOMATCH && invert_regex == 0) || (errcode == 0 && invert_regex == 1)) { + if (invert_regex == 0) -- cgit v1.2.3-74-g34f1