Module: check_mk
Branch: master
Commit: 8b7c848182cf4354e3aac98bf2d67e9ab725f4e0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8b7c848182cf43…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 10:09:03 2013 +0100
FIX hr_fs printer_supply: Improved translation of wrong encoded chars
Now both checks are using the charset defined in the ruleset <tt>snmp_character_encodings</tt>
for the host to decode strings which might contain umlauts with non utf8 encoding.
Also new: We assume a latin1 encoding by default, when no encoding is configured for a host.
---
.bugs/1064 | 7 +++++--
.bugs/838 | 7 +++++--
.bugs/972 | 8 ++++++--
.werks/326 | 12 ++++++++++++
ChangeLog | 1 +
checks/hr_fs | 2 ++
modules/snmp.py | 2 +-
7 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/.bugs/1064 b/.bugs/1064
index 3820e2a..5f2ce6d 100644
--- a/.bugs/1064
+++ b/.bugs/1064
@@ -1,8 +1,11 @@
Title: problem with strange encoding of Umlauts when querying windows SNMP agent
Component: checks
-State: open
+Class: bug
+State: done
Date: 2013-10-31 15:37:33
Targetversion: future
-Class: bug
for detailed description and snmp walk see ticket 13, customer geobasis
+
+2013-12-16 10:07:04: changed state open -> done
+Using encoding configured via the rule "snmp_character_encodings" now. Defaulting to latin-1 now.
diff --git a/.bugs/838 b/.bugs/838
index 0c9581f..981f20f 100644
--- a/.bugs/838
+++ b/.bugs/838
@@ -1,9 +1,9 @@
Title: Its not possible to add contacts groups to foulders if a minus is in name
Component: wato
-State: open
+Class: bug
+State: done
Date: 2013-12-10 10:09:51
Targetversion: 1.2.3i6
-Class: bug
From the german mailing list:
@@ -21,3 +21,6 @@ Ich vermute, dass es an einer Wato-Funktion liegt und beim Parsen des Namens etw
Der Fehler ist reproduzierbar.
+
+2013-12-16 09:36:27: changed state open -> done
+This bug has already been fixed some days/weeks ago.
diff --git a/.bugs/972 b/.bugs/972
index 304dcfc..c06832b 100644
--- a/.bugs/972
+++ b/.bugs/972
@@ -1,9 +1,9 @@
Title: parent scan fails after renaming a wato folder
Component: wato
-State: open
+Class: bug
+State: works4me
Date: 2013-08-09 16:33:23
Targetversion: 1.2.3i5
-Class: bug
mir ist folgendes in der Entwickler Version 2013.06.17 aufgefallen.
Kurzes Beispiel:
@@ -18,3 +18,7 @@ Versucht der Parent Scan in WATO die Hosts unter dem alten Ordner Namen
(Main Directory\Kunde\Hosts )zu finden und schlägt fehl. Alle bestehenden
Regeln wurden, einwandfrei auf den neuen Ordner angepasst. Hoffe das war
euch noch nicht bekannt, habe in der Bug Liste nichts dazu gefunden.
+
+2013-12-16 09:46:23: changed state open -> works4me
+I am unable to reproduce this problem with the current code. Assumint that
+this has already been fixed.
diff --git a/.werks/326 b/.werks/326
new file mode 100644
index 0000000..d41c219
--- /dev/null
+++ b/.werks/326
@@ -0,0 +1,12 @@
+Title: hr_fs printer_supply: Improved translation of wrong encoded chars
+Level: 1
+Component: checks
+Version: 1.2.3i8
+Date: 1387184828
+Class: fix
+
+Now both checks are using the charset defined in the ruleset <tt>snmp_character_encodings</tt>
+for the host to decode strings which might contain umlauts with non utf8 encoding.
+
+Also new: We assume a latin1 encoding by default, when no encoding is configured for a host.
+
diff --git a/ChangeLog b/ChangeLog
index b06f9dd..9fad6a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@
* 0310 FIX: apache_status: Improved handling of unexpeted data sent by agents...
* 0088 FIX: esx_vsphere_datastores: fixed error with reported capacity of 0 bytes...
* 0243 FIX: cisco_qos: no longer crashes when the qos policy name is not set...
+ * 0326 FIX: hr_fs printer_supply: Improved translation of wrong encoded chars...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
diff --git a/checks/hr_fs b/checks/hr_fs
index 06287e4..22353e1 100644
--- a/checks/hr_fs
+++ b/checks/hr_fs
@@ -29,6 +29,7 @@ check_includes['hr_fs'] = [ "df.include" ]
def inventory_hr_fs(info):
mplist = []
for hrtype, hrdescr, hrunits, hrsize, hrused in info:
+ hrdescr = snmp_decode_string(hrdescr)
if hrtype in [ ".1.3.6.1.2.1.25.2.1.4" ] and \
hrdescr not in inventory_df_exclude_mountpoints and \
saveint(hrsize) != 0:
@@ -38,6 +39,7 @@ def inventory_hr_fs(info):
def check_hr_fs(item, params, info):
fslist = []
for hrtype, hrdescr, hrunits, hrsize, hrused in info:
+ hrdescr = snmp_decode_string(hrdescr)
if "patterns" in params or item == hrdescr:
unit_size = saveint(hrunits)
hrsize = saveint(hrsize)
diff --git a/modules/snmp.py b/modules/snmp.py
index ecf8e48..1df83b1 100644
--- a/modules/snmp.py
+++ b/modules/snmp.py
@@ -387,7 +387,7 @@ def snmp_decode_string(text):
if encoding:
return text.decode(encoding).encode("utf-8")
else:
- return text
+ return text.decode('latin1').encode('utf-8')
# .--Classic SNMP--------------------------------------------------------.
# | ____ _ _ ____ _ _ __ __ ____ |
Module: check_mk
Branch: master
Commit: d63c6d65c41d4ab17ecd622cd11aa452d8f0c817
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d63c6d65c41d4a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 16 09:12:13 2013 +0100
Updated bugs
---
.bugs/828 | 6 +++---
.bugs/config | 4 +---
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/.bugs/828 b/.bugs/828
index 86b54f9..9d51899 100644
--- a/.bugs/828
+++ b/.bugs/828
@@ -1,10 +1,10 @@
-Title: locale c.utf8 is missing at least in Debian Squeeze
+Title: locale C.UTF8 is missing at least in Debian Squeeze
Component: checks
State: open
Date: 2013-08-19 09:38:38
Targetversion: future
Class: bug
-If using Debian 6 with flexible notification system, plain e mail and umlauts
-in alias, the mail never receives the mail. Reason is the missing c.utf8
+If using Debian 6 with flexible notification system, plain email and umlauts
+in alias, the mail never receives the mail. Reason is the missing C.UTF8
locale. In german debian versions, there is only de_DE.utf8.
diff --git a/.bugs/config b/.bugs/config
index a81b6c3..e6b60c1 100644
--- a/.bugs/config
+++ b/.bugs/config
@@ -30,8 +30,6 @@ classes = [
]
targetversions = [
- "1.2.2",
- "1.2.3i5",
- "1.2.3i6",
+ "1.2.4",
"future",
]
Module: check_mk
Branch: master
Commit: dc80bea5cb3a0437780a12326b60f5fa62a66920
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dc80bea5cb3a04…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 09:02:13 2013 +0100
FIX Hiding views related to not existing datasources, like the EC now
Customized views loading information from datasources which do not exist
anymore in multisite are now skipped during loading. In previous version,
these views resulted in exceptions / error messages in the GUI.
---
.bugs/1086 | 7 +++++--
.werks/312 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/views.py | 4 +++-
4 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/.bugs/1086 b/.bugs/1086
index b248248..3784921 100644
--- a/.bugs/1086
+++ b/.bugs/1086
@@ -1,9 +1,9 @@
Title: Exception in views when EC views are missing
Component: multisite
-State: open
+Class: bug
+State: done
Date: 2013-12-03 10:12:05
Targetversion: future
-Class: bug
When you enabled the Event Console, modify an EC view and afterwards
disabled the EC again, then the views the modified views base on
@@ -11,3 +11,6 @@ are missing - and also the columns and filters. This leads to exceptions
in other views.
Solution: validate views, catch exceptions.
+
+2013-12-16 09:00:27: changed state open -> done
+Has just been fixed. Only views for existing datasources are loaded into multisite now.
diff --git a/.werks/312 b/.werks/312
new file mode 100644
index 0000000..7a4ed7e
--- /dev/null
+++ b/.werks/312
@@ -0,0 +1,11 @@
+Title: Hiding views related to not existing datasources, like the EC now
+Level: 1
+Component: multisite
+Version: 1.2.3i8
+Date: 1387180830
+Class: fix
+
+Customized views loading information from datasources which do not exist
+anymore in multisite are now skipped during loading. In previous version,
+these views resulted in exceptions / error messages in the GUI.
+
diff --git a/ChangeLog b/ChangeLog
index 552663d..bd21c90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,7 @@
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
* 0239 FIX: Fixed incorrect html formatting when displaying host or service comments...
* 0307 FIX: Increased performance of multisite GUI with a large userbase...
+ * 0312 FIX: Hiding views related to not existing datasources, like the EC now...
WATO:
* 0308 Multisite can now set rotation view permissions for NagVis...
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 1b7c118..067f0d8 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -261,7 +261,9 @@ def load_views():
for name, view in views.items():
view["owner"] = user
view["name"] = name
- html.multisite_views[(user, name)] = view
+
+ if view['datasource'] in multisite_datasources:
+ html.multisite_views[(user, name)] = view
except SyntaxError, e:
raise MKGeneralException(_("Cannot load views from %s/views.mk: %s") % (dirpath, e))
Module: check_mk
Branch: master
Commit: e57268dd783fb1c683a703be14b397df0399630e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e57268dd783fb1…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Fri Dec 13 12:42:04 2013 +0100
raritan_pdu_inlet: new check to monitor inlet sensors of the Raritan PX-2000 PDUs
---
.werks/75 | 8 +++
ChangeLog | 1 +
checkman/raritan_pdu_inlet | 22 +++++++
checks/raritan_pdu_inlet | 146 ++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 177 insertions(+)
diff --git a/.werks/75 b/.werks/75
new file mode 100644
index 0000000..3d9ce67
--- /dev/null
+++ b/.werks/75
@@ -0,0 +1,8 @@
+Title: raritan_pdu_inlet: new check to monitor inlet sensors of the Raritan PX-2000 PDUs
+Level: 1
+Component: checks
+Version: 1.2.3i8
+Date: 1386934866
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 665aad2..ed6da87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@
* 0086 timemachine: new check checking the age of latest backup by timemachine on MAC OS
* 0074 raritan_pdu_plugs: new check for Raritan PX-2000 family PDUs...
* 0107 stulz_alerts, stulz_powerstate, stulz_temp, stulz_humidity: New Checks for Stulz clima devices
+ * 0075 raritan_pdu_inlet: new check to monitor inlet sensors of the Raritan PX-2000 PDUs
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
diff --git a/checkman/raritan_pdu_inlet b/checkman/raritan_pdu_inlet
new file mode 100644
index 0000000..82239ca
--- /dev/null
+++ b/checkman/raritan_pdu_inlet
@@ -0,0 +1,22 @@
+title: Raritan PX-2000 family PDU inlet sensor state
+agents: snmp
+catalog: hw/other
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the state of the inlet sensors of the Raritan PX-2000
+ family of intelligent rack power distribution units (iPDUs).
+ It has been tested with the model PX2-2180CR.
+ The check displays the measured value of the sensor and the state given
+ by the device.
+ Upper and lower warning and critical limits for the values can be configured
+ in the device itself and the device state is determined accordingly.
+ The state of the check reflects the state of the device.
+
+item:
+ The ID Number of the inlet and the sensor type.
+
+inventory:
+ During inventory all available sensors of the inlet and their type are
+ determined. One check per sensor is created.
+
diff --git a/checks/raritan_pdu_inlet b/checks/raritan_pdu_inlet
new file mode 100644
index 0000000..2d7a8d1
--- /dev/null
+++ b/checks/raritan_pdu_inlet
@@ -0,0 +1,146 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+capabilities = {
+ 0: "rmsCurrent",
+ 2: "unbalancedCurrent",
+ 3: "rmsVoltage",
+ 4: "activePower",
+ 5: "apparentPower",
+ 6: "powerFactor",
+ 7: "activeEnergy",
+ 8: "apparentEnergy"
+}
+
+units = {
+ -1: "",
+ 0: "",
+ 1: "V",
+ 2: "A",
+ 3: "W",
+ 4: "VA",
+ 5: "Wh",
+ 6: "VAh",
+ 7: "C",
+ 8: "Hz",
+ 9: "%",
+ 10: "m/s",
+ 11: "Pascal",
+ 12: "psi",
+ 13: "g",
+ 14: "F",
+ 15: "ft",
+ 16: "in",
+ 17: "cm",
+ 18: "m",
+ 19: "rpm",
+ }
+
+states = {
+ -1 : "unavailable",
+ 0 : "open",
+ 1 : "closed",
+ 2 : "belowLowerCritical",
+ 3 : "belowLowerWarning",
+ 4 : "normal",
+ 5 : "aboveUpperWarning",
+ 6 : "aboveUpperCritical",
+ 7 : "on",
+ 8 : "off",
+ 9 : "detected",
+ 10: "notDetected",
+ 11: "alarmed",
+ }
+
+def get_capability(cap_entry, id):
+ bit = bin(ord(cap_entry))[2:][id]
+ if bit == "1":
+ return capabilities[id]
+
+def inventory_raritan_pdu_inlet(info):
+ inventory = []
+ for line in info[1]:
+ i = int(line[0].split(".")[2]) -1
+ cap = get_capability(info[0][0][2][0],i)
+ if line[3] == "1" and cap:
+ item = info[0][0][0] + "-" + cap
+ inventory.append((item, None))
+ return inventory
+
+def check_raritan_pdu_inlet(item, params, info):
+ state = 3
+ message = "Sensor not found"
+
+ label = info[0][0][0]
+ name = info[0][0][1]
+ for line in info[1]:
+ i = int(line[0].split(".")[2]) - 1
+ cap = get_capability(info[0][0][2][0],i)
+ if label + "-" + cap == item:
+ unit = units[int(line[1])]
+ digits = int(line[2])
+ avail = line[3]
+ status = int(line[4])
+ status_txt = states[status]
+ value = float(line[5]) / 10.0**digits
+ message = "sensor " + name
+ message += "status \"%s\", value %.2f%s" % (status_txt,value,unit)
+ if avail != "1" or status in ( 2, 6 ):
+ state = 2
+ elif status == 4:
+ state = 0
+ else:
+ state = 1
+
+ return (state, message)
+
+check_info['raritan_pdu_inlet'] = {
+ "inventory_function" : inventory_raritan_pdu_inlet,
+ "check_function" : check_raritan_pdu_inlet,
+ "service_description" : "Inlet Sensor %s",
+ "has_perfdata" : False,
+ "snmp_info" : [
+ (".1.3.6.1.4.1.13742.6", # General properties of the inlet
+ [
+ "3.3.3.1.2", # label
+ "3.3.3.1.3", # name
+ "3.3.3.1.10", # capabilites
+ ]
+ ),
+ ( ".1.3.6.1.4.1.13742.6", # Properties of the sensors
+ [
+ OID_END,
+ "3.3.4.1.6", # inletSensorUnits
+ "3.3.4.1.7", # inletDecimalDigits
+ "5.2.3.1.2", # inlet sensor availability
+ "5.2.3.1.3", # inlet sensor state
+ "5.2.3.1.4", # inlet sensor value
+ ]
+ )],
+ "snmp_scan_function" : lambda oid: \
+ oid(".1.3.6.1.4.1.13742.6.3.2.1.1.3.1").startswith("PX2-2")
+
+}
Module: check_mk
Branch: master
Commit: 2da6988954109d7ca125a111c531000a960ff7a1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2da6988954109d…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Dec 12 17:43:19 2013 +0100
FIX Prevent service notification on host alerts
In some case the notfication template for services was used, even is was an host problem.
---
.werks/108 | 10 ++++++++++
ChangeLog | 3 +++
modules/notify.py | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/108 b/.werks/108
new file mode 100644
index 0000000..40bf5cb
--- /dev/null
+++ b/.werks/108
@@ -0,0 +1,10 @@
+Title: Prevent service notification on host alerts
+Level: 1
+Component: notifications
+Class: fix
+State: unknown
+Version: 1.2.3i8
+Date: 1386866484
+Targetversion: future
+
+In some case the notfication template for services was used, even is was an host problem.
diff --git a/ChangeLog b/ChangeLog
index 6f2b8eb..174d451 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -34,6 +34,9 @@
* 0309 FIX: Trying to prevent read/write conflicts with a large user base...
* 0311 FIX: Fixed "Inventory failed" message when trying an inventory on clusters via WATO...
+ Notifications:
+ * 0108 FIX: Prevent service notification on host alerts...
+
Reporting & Availability:
* 0018 New option for displaying a legend for the colors used in the timeline...
diff --git a/modules/notify.py b/modules/notify.py
index 2183da1..f72e5b9 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -510,7 +510,7 @@ def notify_via_email(context, write_into_spoolfile):
notify_log(substitute_context(notification_log_template, context))
- if "SERVICEDESC" in context:
+ if "SERVICEDESC" in context and context['SERVICEDESC'].strip():
subject_t = notification_service_subject
body_t = notification_service_body
else:
Module: check_mk
Branch: master
Commit: d055752e81f9733404ff8592e59514bb8858aee3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d055752e81f973…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Dec 12 17:36:48 2013 +0100
FIX cisco_qos: no longer crashes when the qos policy name is not set
When no policy name is set in the cisco device the policy id is used instead.
---
.werks/243 | 8 ++++++++
ChangeLog | 1 +
checks/cisco_qos | 7 +++++--
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/243 b/.werks/243
new file mode 100644
index 0000000..013077a
--- /dev/null
+++ b/.werks/243
@@ -0,0 +1,8 @@
+Title: cisco_qos: no longer crashes when the qos policy name is not set
+Level: 1
+Component: checks
+Version: 1.2.3i8
+Date: 1386866017
+Class: fix
+
+When no policy name is set in the cisco device the policy map id is used instead.
diff --git a/ChangeLog b/ChangeLog
index 35790fa..6aeb966 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@
* 0240 FIX: Virtualmachine names with space no longer have missing piggyback data...
* 0310 FIX: apache_status: Improved handling of unexpeted data sent by agents...
* 0088 FIX: esx_vsphere_datastores: fixed error with reported capacity of 0 bytes...
+ * 0243 FIX: cisco_qos: no longer crashes when the qos policy name is not set...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
diff --git a/checks/cisco_qos b/checks/cisco_qos
index 7d2e092..c9b66e8 100644
--- a/checks/cisco_qos
+++ b/checks/cisco_qos
@@ -206,7 +206,7 @@ def check_cisco_qos(item, params, info):
if policy_map_id is None:
return 3, 'Invalid policy map id'
- policy_name = policies[policy_map_id]
+ policy_name = policies.get(policy_map_id)
policy_id = this_policy_id
objects_id = this_objects_id
@@ -314,7 +314,10 @@ def check_cisco_qos(item, params, info):
state = max(1, state)
infotext += '(!)'
- infotext += ', Policy-Name: %s, Int-Bandwidth: %s' % (policy_name, format_value(bw))
+ if policy_name:
+ infotext += ', Policy-Name: %s, Int-Bandwidth: %s' % (policy_name, format_value(bw))
+ else:
+ infotext += ', Policy-Map-ID: %s, Int-Bandwidth: %s' % (policy_map_id, format_value(bw))
return (state, infotext.lstrip(', '), perfdata)
check_info["cisco_qos"] = {