Module: check_mk
Branch: master
Commit: 20f2763a812c5332a8d83e460987319a672a4369
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=20f2763a812c53…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 23 12:10:07 2015 +0200
Fixed UnicodeDecodeError when processing latin1 encoded agent data for piggyback
---
modules/check_mk_base.py | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 63bb080..048e873 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -656,7 +656,7 @@ def translate_piggyback_host(sourcehost, backedhost):
# To make it possible to match umlauts we need to change the backendhost
# to a unicode string which can then be matched with regexes etc.
# We assume the incoming name is correctly encoded in UTF-8
- backedhost = backedhost.decode('utf-8')
+ backedhost = decode_incoming_string(backedhost)
# 3. Regular expression conversion
if "regex" in translation:
@@ -920,21 +920,22 @@ def parse_info(lines, hostname):
line = stripped_line
if encoding:
- try:
- line = line.decode(encoding)
- except:
- line = line.decode(fallback_agent_output_encoding)
+ line = decode_incoming_string(line, encoding)
else:
- try:
- line = line.decode('utf-8')
- except:
- line = line.decode(fallback_agent_output_encoding)
+ line = decode_incoming_string(line)
section.append(line.split(separator))
return info, piggybacked, persist, agent_cache_info
+def decode_incoming_string(s, encoding="utf-8"):
+ try:
+ return s.decode('utf-8')
+ except:
+ return s.decode(fallback_agent_output_encoding)
+
+
def cachefile_age(filename):
try:
return time.time() - os.stat(filename)[8]
Module: check_mk
Branch: master
Commit: cc3b05167dcedb26226c094cd0b2cfda3ecfd5e8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cc3b05167dcedb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 23 10:13:43 2015 +0200
#2474 FIX Fixed possible corruption of user datasets (contact, mail, rbn config)
When moving user notification rules in an installation where a lot of users
are working with the GUI, it could happen that the file which stores contact,
mail and user rbn configuration (contacts.mk) could corrupt and lead to lost
attributes for all the users.
---
.werks/2474 | 13 +++++++++++++
ChangeLog | 3 ++-
web/htdocs/wato.py | 2 +-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/2474 b/.werks/2474
new file mode 100644
index 0000000..e8d7e11
--- /dev/null
+++ b/.werks/2474
@@ -0,0 +1,13 @@
+Title: Fixed possible corruption of user datasets (contact, mail, rbn config)
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1437639107
+
+When moving user notification rules in an installation where a lot of users
+are working with the GUI, it could happen that the file which stores contact,
+mail and user rbn configuration (contacts.mk) could corrupt and lead to lost
+attributes for all the users.
diff --git a/ChangeLog b/ChangeLog
index f017a01..7f02900 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,9 +27,9 @@
* 2286 hp_procurve_cpu, hp_procurve_mem, hp_procurve_sensors: now can monitor HP 2920 Switch Stack...
* 2287 New Checks fjdarye500_cadaps fjdarye500_cmods fjdarye500_cmods_flash fjdarye500_cmods_mem fjdarye500_conencs fjdarye500_cpsus fjdarye500_devencs fjdarye500_disks fjdarye500_expanders fjdarye500_inletthmls fjdarye500_sum fjdarye500_syscaps fjdarye500_thmls: Fujitsu Eternus DX500 S3
* 2409 AIX DB2 monitoring: the agent plugin now processes all db2 instances in parallel...
- * 2410 ESX / agent_vsphere: Now able to re-use session cookies...
* 2288 check_mk_agent.aix: New sections for HACMP cluster manager...
* 2289 New checks: aix_hacmp_resources, aix_hacmp_services, aix_hacmp_nodes...
+ * 2410 ESX / agent_vsphere: Now able to re-use session cookies...
* 2315 FIX: windows agent: BOM replacement, fixed incorrect byte offset...
* 2316 FIX: windows agent: fix garbled output of cached agent plugins...
* 2358 FIX: check_mk_agent.solaris: more correct computation of zfs used space...
@@ -116,6 +116,7 @@
* 2466 FIX: Fixed exception when searching for rulesets / global settings using special characters like umlauts
* 2467 FIX: Fixed encoding exception occuring in localized GUI when a WATO action triggers an error message...
* 2407 FIX: WATO master/slave replication: fixed problem where the configuration from the master site was not activate on slave site...
+ * 2474 FIX: Fixed possible corruption of user datasets (contact, mail, rbn config)...
Notifications:
* 2478 Integrated notification plugin for mobile phone push messages via Pushover...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 1870068..d5b00b4 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9628,7 +9628,7 @@ def mode_user_notifications(phase, profilemode):
if phase == "title":
return title
- users = userdb.load_users(lock = phase == 'action')
+ users = userdb.load_users(lock = phase == 'action' or html.has_var("_move"))
user = users[userid]
rules = user.setdefault("notification_rules", [])
Module: check_mk
Branch: master
Commit: 7dd24fca70b345b493da65074af34c55ac38e032
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7dd24fca70b345…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jul 22 15:35:18 2015 +0200
#2410 ESX / agent_vsphere: Now able to re-use session cookies
The agent_vsphere now reuses the session cookie as long as possible.
This prevents large amounts of Logon/Logoff messages in the vCenter log.
Whenever the cookie gets invalid the agent starts from the beginning, carries out
a normal login and refreshes the outdated cookie.
---
.werks/2410 | 13 +
ChangeLog | 3 +-
agents/special/agent_vsphere | 1005 ++++++++++++++++++++++--------------------
3 files changed, 554 insertions(+), 467 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=7dd24fca70…