Module: check_mk
Branch: master
Commit: 46bc6efd84cdc3e879150e91b262f6ea983c777b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=46bc6efd84cdc3…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Thu Nov 20 18:47:31 2014 +0100
#1449 FIX nginx_status: agent plugin no longer honours "http(s)_proxy" env
variables of root user
---
.werks/1449 | 9 +++++++++
ChangeLog | 1 +
agents/plugins/nginx_status | 3 +++
3 files changed, 13 insertions(+)
diff --git a/.werks/1449 b/.werks/1449
new file mode 100644
index 0000000..3fe1a9d
--- /dev/null
+++ b/.werks/1449
@@ -0,0 +1,9 @@
+Title: nginx_status: agent plugin no longer honours "http(s)_proxy" env
variables of root user
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i7
+Date: 1416505550
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index b43a02d..6a24e19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
* 1511 FIX: oracle_jobs: avoid broken checks, make compatible with old version...
* 1513 FIX: Handle broken SNMP bulk walk implementation of Mikrotik Router firmware
RouterOS v6.22...
* 1503 FIX: Fixed monitoring of multiple SAP instances with one mk_sap plugin...
+ * 1449 FIX: nginx_status: agent plugin no longer honours "http(s)_proxy"
env variables of root user
Multisite:
* 1508 Allow input of plugin output and perfdata when faking check results...
diff --git a/agents/plugins/nginx_status b/agents/plugins/nginx_status
index 42eb9a1..fe0ec00 100755
--- a/agents/plugins/nginx_status
+++ b/agents/plugins/nginx_status
@@ -39,6 +39,9 @@
import os, sys, urllib2, re
+# tell urllib2 not to honour "http(s)_proxy" env variables
+urllib2.getproxies = lambda: {}
+
config_dir = os.getenv("MK_CONFDIR", "/etc/check_mk")
config_file = config_dir + "/nginx_status.cfg"