1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 ? "</A>" : ""),
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 */
|