Module: check_mk
Branch: master
Commit: 6ecb92a9faaf90cff02eac06bfb00cfb7d66f2f4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6ecb92a9faaf90…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 19 13:49:41 2014 +0100
#1792 FIX Fix path to special agents in case of manual installation
---
.werks/1792 | 10 ++++++++++
ChangeLog | 1 +
modules/check_mk.py | 5 +++--
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/1792 b/.werks/1792
new file mode 100644
index 0000000..0f59f1d
--- /dev/null
+++ b/.werks/1792
@@ -0,0 +1,10 @@
+Title: Fix path to special agents in case of manual installation
+Level: 1
+Component: core
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1418993367
+
+
diff --git a/ChangeLog b/ChangeLog
index b0130c2..dc3aaff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
Core & Setup:
* 1759 Packed RPM and DEB agent packages are now shipped with normal Check_MK
package...
* 1791 FIX: Fix problem where many bogus RRD files for Check_MK service would be
created...
+ * 1792 FIX: Fix path to special agents in case of manual installation
Checks & Agents:
* 1665 agent_netapp: New special agent for NetApp monitoring via Web-API...
diff --git a/modules/check_mk.py b/modules/check_mk.py
index dcb10d3..045a7d3 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -109,7 +109,6 @@ checks_dir =
'/usr/share/check_mk/checks'
notifications_dir = '/usr/share/check_mk/notifications'
inventory_dir = '/usr/share/check_mk/inventory'
agents_dir = '/usr/share/check_mk/agents'
-special_agent_dir = agents_dir + "/special"
check_manpages_dir = '/usr/share/doc/check_mk/checks'
modules_dir = '/usr/share/check_mk/modules'
var_dir = '/var/lib/check_mk'
@@ -1089,6 +1088,8 @@ def get_sorted_check_table(hostname, remove_duplicates=False,
world="config"):
# be None in most cases -> to TCP connect on port 6556
def get_datasource_program(hostname, ipaddress):
+ special_agents_dir = agents_dir + "/special"
+
# First check WATO-style special_agent rules
for agentname, ruleset in special_agents.items():
params = host_extra_conf(hostname, ruleset)
@@ -1099,7 +1100,7 @@ def get_datasource_program(hostname, ipaddress):
os.path.exists(local_special_agents_dir + "/agent_" +
agentname):
path = local_special_agents_dir + "/agent_" + agentname
else:
- path = special_agent_dir + "/agent_" + agentname
+ path = special_agents_dir + "/agent_" + agentname
return path + " " + cmd_arguments
programs = host_extra_conf(hostname, datasource_programs)