Module: check_mk
Branch: master
Commit: 97926f2f41b648f67213f17746b9534757702395
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=97926f2f41b648…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Fri Oct 13 10:03:53 2017 +0200
5225 apache_status: Change autodetection logic of agent plugin to include a process
multiple times if it listens on multiple ports
Change-Id: Iac3d0557ed60ef6c5326051653b6f1d80ef5f5ec
---
.werks/5225 | 10 ++++++++++
agents/plugins/apache_status | 6 ------
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/.werks/5225 b/.werks/5225
new file mode 100644
index 0000000..ab7f931
--- /dev/null
+++ b/.werks/5225
@@ -0,0 +1,10 @@
+Title: apache_status: Change autodetection logic of agent plugin to include a process
multiple times if it listens on multiple ports
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1507881782
+Class: feature
+
+
diff --git a/agents/plugins/apache_status b/agents/plugins/apache_status
index d92f15d..c97e8bc 100755
--- a/agents/plugins/apache_status
+++ b/agents/plugins/apache_status
@@ -65,7 +65,6 @@ if os.path.exists(config_file):
def try_detect_servers():
- pids = []
results = []
for line in os.popen('netstat -tlnp 2>/dev/null').readlines():
@@ -88,11 +87,6 @@ def try_detect_servers():
if proc not in procs:
continue
- # Add only the first found port of a single server process
- if pid in pids:
- continue
- pids.append(pid)
-
address, port = parts[3].rsplit(':', 1)
port = int(port)