Module: check_mk
Branch: master
Commit: 3eaa52636bf6868fff702354682f6b0a3f4ebf0d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3eaa52636bf686…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Mar 2 10:11:17 2011 +0100
output agent version also for mixed hosts
---
ChangeLog | 1 +
modules/check_mk_base.py | 6 ++----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bb8ed69..3fc1bbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
* FIX: setup.sh: do not prepend current directory to url_prefix
* setup.sh: Allow to install Check_MK into existing OMD site (>= 0.46).
This is still experimental!
+ * FIX: output agent version also for mixed (tcp|snmp) hosts
Checks & Agents:
* FIX: drbd now handles output of older version without an ep field
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 85ed85f..e012d92 100755
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -743,6 +743,7 @@ def do_all_checks_on_host(hostname, ipaddress):
num_errors = 0
check_table = get_sorted_check_table(hostname)
problems = []
+
for checkname, item, params, description, info in check_table:
# In case of a precompiled check table info is the aggrated
# service name. In the non-precompiled version there are the dependencies
@@ -819,11 +820,8 @@ def do_all_checks_on_host(hostname, ipaddress):
submit_aggregated_results(hostname)
try:
- if not is_snmp_host(hostname):
+ if is_tcp_host(hostname):
version_info = get_host_info(hostname, ipaddress, 'check_mk')
- # TODO: remove this later, when all agents have been converted
- if not version_info:
- version_info = get_host_info(hostname, ipaddress, 'mknagios')
agent_version = version_info[0][1]
else:
agent_version = "(unknown)"