diff options
Diffstat (limited to 'web/attachments/250664-check_http.c.diff')
-rw-r--r-- | web/attachments/250664-check_http.c.diff | 40 |
1 files changed, 40 insertions, 0 deletions
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 @@ | |||
1 | Index: nagios-plugins-trunk/plugins/check_http.c | ||
2 | =================================================================== | ||
3 | --- nagios-plugins-trunk/plugins/check_http.c (revision 1808) | ||
4 | +++ nagios-plugins-trunk/plugins/check_http.c (working copy) | ||
5 | @@ -247,7 +247,7 @@ | ||
6 | break; | ||
7 | case 'c': /* critical time threshold */ | ||
8 | if (!is_nonnegative (optarg)) | ||
9 | - usage2 (_("Critical threshold must be integer"), optarg); | ||
10 | + usage2 (_("Critical threshold must be non-negative number"), optarg); | ||
11 | else { | ||
12 | critical_time = strtod (optarg, NULL); | ||
13 | check_critical_time = TRUE; | ||
14 | @@ -255,7 +255,7 @@ | ||
15 | break; | ||
16 | case 'w': /* warning time threshold */ | ||
17 | if (!is_nonnegative (optarg)) | ||
18 | - usage2 (_("Warning threshold must be integer"), optarg); | ||
19 | + usage2 (_("Warning threshold must be non-negative number"), optarg); | ||
20 | else { | ||
21 | warning_time = strtod (optarg, NULL); | ||
22 | check_warning_time = TRUE; | ||
23 | @@ -982,14 +982,14 @@ | ||
24 | microsec = deltime (tv); | ||
25 | elapsed_time = (double)microsec / 1.0e6; | ||
26 | asprintf (&msg, | ||
27 | - _("HTTP WARNING: %s - %.3f second response time %s|%s %s\n"), | ||
28 | + _("%s - %.3f second response time %s|%s %s\n"), | ||
29 | status_line, elapsed_time, | ||
30 | (display_html ? "</A>" : ""), | ||
31 | perfd_time (elapsed_time), perfd_size (pagesize)); | ||
32 | if (check_critical_time == TRUE && elapsed_time > critical_time) | ||
33 | - die (STATE_CRITICAL, "%s", msg); | ||
34 | + die (STATE_CRITICAL, "HTTP CRITICAL: %s", msg); | ||
35 | if (check_warning_time == TRUE && elapsed_time > warning_time) | ||
36 | - die (STATE_WARNING, "%s", msg); | ||
37 | + die (STATE_WARNING, "HTTP WARNING: %s", msg); | ||
38 | |||
39 | /* Page and Header content checks go here */ | ||
40 | /* these checks should be last */ | ||