Module: check_mk
Branch: master
Commit: da0ec72f0cb658064e3832c27fc39bf74eaf49a5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=da0ec72f0cb658…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jun 19 10:05:10 2013 +0200
job check: better handling of unexpected agent output
---
ChangeLog | 1 +
checks/job | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index e5498b3..efa5c6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@
* fileinfo: no longer inventorize missing files(reported by windows agent)
* cluster hosts: removed agent version output from Check_MK service (this
was misleading for different agent versions on multiple nodes)
+ * job check: better handling of unexpected agent output
Multisite:
* User accounts can now be locked after a specified amount of auth
diff --git a/checks/job b/checks/job
index 1082dbc..3a75bff 100644
--- a/checks/job
+++ b/checks/job
@@ -70,7 +70,7 @@ def job_parse(item, info):
elif found and line[0] == '==>':
break # Stop at next section
- elif found:
+ elif found and len(line) == 2:
key, val = line
# Convert several keys/values
if key == 'real_time':
Module: check_mk
Branch: master
Commit: 76b27ee50117d069b1dcb3b95f8bea1b2c6524e5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=76b27ee50117d0…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jun 19 09:51:23 2013 +0200
Updated bug entries #0931
---
.bugs/931 | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/.bugs/931 b/.bugs/931
new file mode 100644
index 0000000..169eb1d
--- /dev/null
+++ b/.bugs/931
@@ -0,0 +1,13 @@
+Title: Cluster requires same agent type as cluster node
+Component: core
+State: open
+Date: 2013-06-19 09:46:28
+Targetversion: future
+Class: bug
+
+If the agent type attribute of a cluster and its notes differs
+the check_mk agent will fail
+
+This is caused by the various is_tcp_host is_snmp_host precompiled functions
+which return fixed values. The nodes receive the value of the cluster -
+thus leading to the checks downfall.
Module: check_mk
Branch: master
Commit: a501b97dfaffbede700b82ba663bba0eabcf9740
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a501b97dfaffbe…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jun 18 16:40:38 2013 +0200
FIX: LDAP: Disabling use of referrals in active directory configuration
Conflicts:
ChangeLog
---
ChangeLog | 2 ++
web/plugins/userdb/ldap.py | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 72512ce..e5498b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -188,6 +188,8 @@
Checks & Agents:
* FIX: winperf_processor: fix case where CPU percent is exactly 100%
+ Multisite:
+ * FIX: LDAP: Disabling use of referrals in active directory configuration
1.2.2p2:
Core:
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index eeb94f2..ae51e41 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -130,6 +130,11 @@ def ldap_connect():
ldap_connection.protocol_version = config.ldap_connection['version']
ldap_connection.network_timeout = config.ldap_connection.get('connect_timeout', 2.0)
+ # When using the domain top level as base-dn, the subtree search stumbles with referral objects.
+ # whatever. We simply disable them here when using active directory. Hope this fixes all problems.
+ if config.ldap_connection['type'] == 'ad':
+ ldap_connection.set_option(ldap.OPT_REFERRALS, 0)
+
ldap_default_bind()
# on success, store the connection options the connection has been made with
Module: check_mk
Branch: master
Commit: 31c3e1312f5919f4d691bb6e5d118ca98c5c4ad3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=31c3e1312f5919…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jun 18 10:25:22 2013 +0200
Fixed initialization of new ip lookup cache
---
modules/check_mk.py | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index b259b55..1dcdc0c 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -330,7 +330,7 @@ snmp_check_interval = []
# global variables used to cache temporary values (not needed in check_mk_base)
ip_to_hostname_cache = None
# in memory cache, contains permanently cached ipaddresses from ipaddresses.cache during runtime
-g_ip_lookup_cache = {}
+g_ip_lookup_cache = None
# The following data structures will be filled by the various checks
# found in the checks/ directory.
@@ -1067,6 +1067,8 @@ def lookup_ipaddress(hostname):
if hostname in g_dns_cache:
return g_dns_cache[hostname]
+ init_ip_lookup_cache()
+
# Now do the actual DNS lookup
try:
ipa = socket.gethostbyname(hostname)
@@ -1075,9 +1077,8 @@ def lookup_ipaddress(hostname):
if ipa != g_ip_lookup_cache.get(hostname):
g_ip_lookup_cache[hostname] = ipa
write_ip_lookup_cache()
- except Exception, e:
+ except:
# Initialize the lookup cache when called for the first time
- init_ip_lookup_cache()
if hostname in g_ip_lookup_cache:
ipa = g_ip_lookup_cache[hostname]
else:
@@ -1088,7 +1089,11 @@ def lookup_ipaddress(hostname):
def init_ip_lookup_cache():
global g_ip_lookup_cache
- g_ip_lookup_cache = eval(file(var_dir + '/ipaddresses.cache').read())
+ if g_ip_lookup_cache is None:
+ try:
+ g_ip_lookup_cache = eval(file(var_dir + '/ipaddresses.cache').read())
+ except:
+ g_ip_lookup_cache = {}
def write_ip_lookup_cache():
file(var_dir + '/ipaddresses.cache', 'w').write(repr(g_ip_lookup_cache))