diff options
Diffstat (limited to 'plugins/check_http.c')
| -rw-r--r-- | plugins/check_http.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index c9d4d040..4734d75c 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
| @@ -795,7 +795,7 @@ check_http (void) | |||
| 795 | else if (onredirect == STATE_CRITICAL) | 795 | else if (onredirect == STATE_CRITICAL) |
| 796 | printf ("CRITICAL"); | 796 | printf ("CRITICAL"); |
| 797 | elapsed_time = delta_time (tv); | 797 | elapsed_time = delta_time (tv); |
| 798 | asprintf (&msg, " - %s - %7.3f second response time %s%s|time=%7.3f\n", | 798 | asprintf (&msg, " - %s - %.3f second response time %s%s|time=%.3f\n", |
| 799 | status_line, elapsed_time, timestamp, | 799 | status_line, elapsed_time, timestamp, |
| 800 | (display_html ? "</A>" : ""), elapsed_time); | 800 | (display_html ? "</A>" : ""), elapsed_time); |
| 801 | terminate (onredirect, msg); | 801 | terminate (onredirect, msg); |
| @@ -807,7 +807,7 @@ check_http (void) | |||
| 807 | 807 | ||
| 808 | /* check elapsed time */ | 808 | /* check elapsed time */ |
| 809 | elapsed_time = delta_time (tv); | 809 | elapsed_time = delta_time (tv); |
| 810 | asprintf (&msg, "HTTP problem: %s - %7.3f second response time %s%s|time=%7.3f\n", | 810 | asprintf (&msg, "HTTP problem: %s - %.3f second response time %s%s|time=%.3f\n", |
| 811 | status_line, elapsed_time, timestamp, | 811 | status_line, elapsed_time, timestamp, |
| 812 | (display_html ? "</A>" : ""), elapsed_time); | 812 | (display_html ? "</A>" : ""), elapsed_time); |
| 813 | if (check_critical_time == TRUE && elapsed_time > critical_time) | 813 | if (check_critical_time == TRUE && elapsed_time > critical_time) |
| @@ -820,13 +820,13 @@ check_http (void) | |||
| 820 | 820 | ||
| 821 | if (strlen (string_expect)) { | 821 | if (strlen (string_expect)) { |
| 822 | if (strstr (page, string_expect)) { | 822 | if (strstr (page, string_expect)) { |
| 823 | printf ("HTTP OK %s - %7.3f second response time %s%s|time=%7.3f\n", | 823 | printf ("HTTP OK %s - %.3f second response time %s%s|time=%.3f\n", |
| 824 | status_line, elapsed_time, | 824 | status_line, elapsed_time, |
| 825 | timestamp, (display_html ? "</A>" : ""), elapsed_time); | 825 | timestamp, (display_html ? "</A>" : ""), elapsed_time); |
| 826 | exit (STATE_OK); | 826 | exit (STATE_OK); |
| 827 | } | 827 | } |
| 828 | else { | 828 | else { |
| 829 | printf ("CRITICAL - string not found%s|time=%7.3f\n", | 829 | printf ("CRITICAL - string not found%s|time=%.3f\n", |
| 830 | (display_html ? "</A>" : ""), elapsed_time); | 830 | (display_html ? "</A>" : ""), elapsed_time); |
| 831 | exit (STATE_CRITICAL); | 831 | exit (STATE_CRITICAL); |
| 832 | } | 832 | } |
| @@ -835,14 +835,14 @@ check_http (void) | |||
| 835 | if (strlen (regexp)) { | 835 | if (strlen (regexp)) { |
| 836 | errcode = regexec (&preg, page, REGS, pmatch, 0); | 836 | errcode = regexec (&preg, page, REGS, pmatch, 0); |
| 837 | if (errcode == 0) { | 837 | if (errcode == 0) { |
| 838 | printf ("HTTP OK %s - %7.3f second response time %s%s|time=%7.3f\n", | 838 | printf ("HTTP OK %s - %.3f second response time %s%s|time=%.3f\n", |
| 839 | status_line, elapsed_time, | 839 | status_line, elapsed_time, |
| 840 | timestamp, (display_html ? "</A>" : ""), elapsed_time); | 840 | timestamp, (display_html ? "</A>" : ""), elapsed_time); |
| 841 | exit (STATE_OK); | 841 | exit (STATE_OK); |
| 842 | } | 842 | } |
| 843 | else { | 843 | else { |
| 844 | if (errcode == REG_NOMATCH) { | 844 | if (errcode == REG_NOMATCH) { |
| 845 | printf ("CRITICAL - pattern not found%s|time=%7.3f\n", | 845 | printf ("CRITICAL - pattern not found%s|time=%.3f\n", |
| 846 | (display_html ? "</A>" : ""), elapsed_time); | 846 | (display_html ? "</A>" : ""), elapsed_time); |
| 847 | exit (STATE_CRITICAL); | 847 | exit (STATE_CRITICAL); |
| 848 | } | 848 | } |
| @@ -863,7 +863,7 @@ check_http (void) | |||
| 863 | exit (STATE_WARNING); | 863 | exit (STATE_WARNING); |
| 864 | } | 864 | } |
| 865 | /* We only get here if all tests have been passed */ | 865 | /* We only get here if all tests have been passed */ |
| 866 | asprintf (&msg, "HTTP OK %s - %7.3f second response time %s%s|time=%7.3f\n", | 866 | asprintf (&msg, "HTTP OK %s - %.3f second response time %s%s|time=%.3f\n", |
| 867 | status_line, (float)elapsed_time, | 867 | status_line, (float)elapsed_time, |
| 868 | timestamp, (display_html ? "</A>" : ""), elapsed_time); | 868 | timestamp, (display_html ? "</A>" : ""), elapsed_time); |
| 869 | terminate (STATE_OK, msg); | 869 | terminate (STATE_OK, msg); |
