aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2017-03-02 09:55:13 +0000
committerMathieu Arnold <mat@FreeBSD.org>2017-03-02 09:55:13 +0000
commit5efa59cc20ca221e60d25f6cc4b2859a58b44603 (patch)
tree0dca0e51a62aa26bd54fe16baea75d033e2a02bc /net-mgmt
parentd57cc0e5c94769022843399b9e47483425120b06 (diff)
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/nagios-plugins/Makefile2
-rw-r--r--net-mgmt/nagios-plugins/files/patch-plugins_check__http.c25
2 files changed, 26 insertions, 1 deletions
diff --git a/net-mgmt/nagios-plugins/Makefile b/net-mgmt/nagios-plugins/Makefile
index c5fd6fde15bf..6188a46ce005 100644
--- a/net-mgmt/nagios-plugins/Makefile
+++ b/net-mgmt/nagios-plugins/Makefile
@@ -3,7 +3,7 @@
PORTNAME= nagios-plugins
PORTVERSION= 2.2.0
-PORTREVISION= 0
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= net-mgmt
MASTER_SITES= https://www.nagios-plugins.org/download/ \
diff --git a/net-mgmt/nagios-plugins/files/patch-plugins_check__http.c b/net-mgmt/nagios-plugins/files/patch-plugins_check__http.c
new file mode 100644
index 000000000000..2f3573b755bd
--- /dev/null
+++ b/net-mgmt/nagios-plugins/files/patch-plugins_check__http.c
@@ -0,0 +1,25 @@
+From 7300528aca1da07b93cab52493552b445b1c276b Mon Sep 17 00:00:00 2001
+From: "John C. Frickson" <jfrickson@nagios.com>
+Date: Mon, 27 Feb 2017 15:29:06 -0600
+Subject: [PATCH] check_http reports warning where it should report ok with -e
+
+Fix for issue #236
+--- plugins/check_http.c.orig 2017-01-19 16:01:31 UTC
++++ plugins/check_http.c
+@@ -1263,12 +1263,14 @@ check_http (void)
+ /* server errors result in a critical state */
+ else if (http_status >= 500) {
+ xasprintf (&msg, _("%s%s - "), msg, status_line);
+- result = STATE_CRITICAL;
++ if (bad_response || !server_expect_yn)
++ result = STATE_CRITICAL;
+ }
+ /* client errors result in a warning state */
+ else if (http_status >= 400) {
+ xasprintf (&msg, _("%s%s - "), msg, status_line);
+- result = max_state_alt(STATE_WARNING, result);
++ if (bad_response || !server_expect_yn)
++ result = max_state_alt(STATE_WARNING, result);
+ }
+ /* check redirected page if specified */
+ else if (http_status >= 300) {