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. --- web/attachments/250664-check_http.c.diff | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 web/attachments/250664-check_http.c.diff (limited to 'web/attachments/250664-check_http.c.diff') diff --git a/web/attachments/250664-check_http.c.diff b/web/attachments/250664-check_http.c.diff new file mode 100644 index 0000000..add888d --- /dev/null +++ b/web/attachments/250664-check_http.c.diff @@ -0,0 +1,40 @@ +Index: nagios-plugins-trunk/plugins/check_http.c +=================================================================== +--- nagios-plugins-trunk/plugins/check_http.c (revision 1808) ++++ nagios-plugins-trunk/plugins/check_http.c (working copy) +@@ -247,7 +247,7 @@ + break; + case 'c': /* critical time threshold */ + if (!is_nonnegative (optarg)) +- usage2 (_("Critical threshold must be integer"), optarg); ++ usage2 (_("Critical threshold must be non-negative number"), optarg); + else { + critical_time = strtod (optarg, NULL); + check_critical_time = TRUE; +@@ -255,7 +255,7 @@ + break; + case 'w': /* warning time threshold */ + if (!is_nonnegative (optarg)) +- usage2 (_("Warning threshold must be integer"), optarg); ++ usage2 (_("Warning threshold must be non-negative number"), optarg); + else { + warning_time = strtod (optarg, NULL); + check_warning_time = TRUE; +@@ -982,14 +982,14 @@ + microsec = deltime (tv); + elapsed_time = (double)microsec / 1.0e6; + asprintf (&msg, +- _("HTTP WARNING: %s - %.3f second response time %s|%s %s\n"), ++ _("%s - %.3f second response time %s|%s %s\n"), + status_line, elapsed_time, + (display_html ? "" : ""), + perfd_time (elapsed_time), perfd_size (pagesize)); + if (check_critical_time == TRUE && elapsed_time > critical_time) +- die (STATE_CRITICAL, "%s", msg); ++ die (STATE_CRITICAL, "HTTP CRITICAL: %s", msg); + if (check_warning_time == TRUE && elapsed_time > warning_time) +- die (STATE_WARNING, "%s", msg); ++ die (STATE_WARNING, "HTTP WARNING: %s", msg); + + /* Page and Header content checks go here */ + /* these checks should be last */ -- cgit v1.2.3-74-g34f1