diff options
author | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-05 00:54:09 +0000 |
---|---|---|
committer | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-05 00:54:09 +0000 |
commit | 2ab4d8fc278413b01ff9c4e4496f892398f80a4c (patch) | |
tree | 6d402f5bf1b4673d00f97bbb84b1ea6b4badd060 /plugins/check_http.c | |
parent | e9e1fe6ef5720adf355b605ffdbe94cd608cc46c (diff) | |
download | monitoring-plugins-2ab4d8fc278413b01ff9c4e4496f892398f80a4c.tar.gz |
fix patch 998291
fix patch 1078934 expect check_ssh fix and check_nt perfdata should stay
on one word like in nagios
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1004 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r-- | plugins/check_http.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index 6f8ad9a4..dd058219 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
@@ -676,17 +676,17 @@ check_document_dates (const char *headers) | |||
676 | } else if (!document_date || !*document_date) { | 676 | } else if (!document_date || !*document_date) { |
677 | die (STATE_CRITICAL, _("Document modification date unknown\n")); | 677 | die (STATE_CRITICAL, _("Document modification date unknown\n")); |
678 | } else { | 678 | } else { |
679 | time_t sd = parse_time_string (server_date); | 679 | time_t srv_data = parse_time_string (server_date); |
680 | time_t dd = parse_time_string (document_date); | 680 | time_t doc_data = parse_time_string (document_date); |
681 | 681 | ||
682 | if (sd <= 0) { | 682 | if (srv_data <= 0) { |
683 | die (STATE_CRITICAL, _("CRITICAL - Server date \"%100s\" unparsable"), server_date); | 683 | die (STATE_CRITICAL, _("CRITICAL - Server date \"%100s\" unparsable"), server_date); |
684 | } else if (dd <= 0) { | 684 | } else if (doc_data <= 0) { |
685 | die (STATE_CRITICAL, _("CRITICAL - Document date \"%100s\" unparsable"), document_date); | 685 | die (STATE_CRITICAL, _("CRITICAL - Document date \"%100s\" unparsable"), document_date); |
686 | } else if (dd > sd + 30) { | 686 | } else if (doc_data > srv_data + 30) { |
687 | die (STATE_CRITICAL, _("CRITICAL - Document is %d seconds in the future\n"), dd - sd); | 687 | die (STATE_CRITICAL, _("CRITICAL - Document is %d seconds in the future\n"), (int)doc_data - (int)srv_data); |
688 | } else if (dd < sd - maximum_age) { | 688 | } else if (doc_data < srv_data - maximum_age) { |
689 | int n = (sd - dd); | 689 | int n = (srv_data - doc_data); |
690 | if (n > (60 * 60 * 24 * 2)) | 690 | if (n > (60 * 60 * 24 * 2)) |
691 | die (STATE_CRITICAL, | 691 | die (STATE_CRITICAL, |
692 | _("CRITICAL - Last modified %.1f days ago\n"), | 692 | _("CRITICAL - Last modified %.1f days ago\n"), |