Module: check_mk
Branch: master
Commit: bd4d85bf48692811975fcafc3469dba84252e42c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bd4d85bf486928…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 4 08:37:35 2015 +0100
#2088 FIX cisco_cpu: Dealing with non CPU utilization information correctly
The check resulted in an exception when the host could be contacted
via SNMP, but the host did not provide a value for the CPU utilization.
---
.werks/2088 | 11 +++++++++++
ChangeLog | 1 +
checks/cisco_cpu | 5 ++++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/2088 b/.werks/2088
new file mode 100644
index 0000000..3ed81c2
--- /dev/null
+++ b/.werks/2088
@@ -0,0 +1,11 @@
+Title: cisco_cpu: Dealing with non CPU utilization information correctly
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1425454581
+
+The check resulted in an exception when the host could be contacted
+via SNMP, but the host did not provide a value for the CPU utilization.
diff --git a/ChangeLog b/ChangeLog
index c17ee8f..9f1ba8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -223,6 +223,7 @@
* 2086 FIX: apc_ats_status: Fixed exception when source different than selected source
* 2087 FIX: netapp_api_temp: Fixed exception when dealing with old discovered checks...
* 2051 FIX: windows agent: no longer outputs stderr of local and plugin scripts...
+ * 2088 FIX: cisco_cpu: Dealing with non CPU utilization information correctly...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/cisco_cpu b/checks/cisco_cpu
index 03e41d5..d548137 100644
--- a/checks/cisco_cpu
+++ b/checks/cisco_cpu
@@ -30,10 +30,13 @@
cisco_cpu_default_levels = (80.0, 90.0)
def inventory_cisco_cpu(info):
- if info:
+ if info and info[0] != [None, None]:
return [( None, 'cisco_cpu_default_levels') ]
def check_cisco_cpu(item, params, info):
+ if info[0] == [None, None]:
+ return 3, 'No information about the CPU utilization available'
+
if info[0][1]:
util = float(info[0][1])
else:
Module: check_mk
Branch: master
Commit: 227e1665ad385609454fb9231f9c17d45df1b68a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=227e1665ad3856…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Mar 3 16:52:26 2015 +0100
#2054 FIX Sidebar snapin "Tree of folders": fixed exception when using localized default value
The sidebar snapin "Tree of folders" had an encoding exception in the following setting
<ul>
<li>The user never changed the default values for this snapin</li>
<li>The interface language was different from the default language</li>
<li>The translated text in the snapin contained umlauts like ä, ö, ü</li>
</ul>
This has been fixed.
---
.werks/2054 | 18 ++++++++++++++++++
ChangeLog | 1 +
web/plugins/sidebar/wato.py | 2 ++
3 files changed, 21 insertions(+)
diff --git a/.werks/2054 b/.werks/2054
new file mode 100644
index 0000000..f21b402
--- /dev/null
+++ b/.werks/2054
@@ -0,0 +1,18 @@
+Title: Sidebar snapin "Tree of folders": fixed exception when using localized default value
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1425397160
+
+The sidebar snapin "Tree of folders" had an encoding exception in the following setting
+
+<ul>
+<li>The user never changed the default values for this snapin</li>
+<li>The interface language was different from the default language</li>
+<li>The translated text in the snapin contained umlauts like ä, ö, ü</li>
+</ul>
+
+This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 99bf3bc..c17ee8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -270,6 +270,7 @@
* 2008 FIX: Users created during basic auth login get the role assigned configured in "default user profile"...
* 2011 FIX: "Service Group" view sorts/groups the services now correctly by host
* 2024 FIX: Views: Fixed problem when filtering views by strings containing umlauts...
+ * 2054 FIX: Sidebar snapin "Tree of folders": fixed exception when using localized default value...
WATO:
* 1760 Added search form to manual checks page
diff --git a/web/plugins/sidebar/wato.py b/web/plugins/sidebar/wato.py
index cb3adfc..67ecc45 100644
--- a/web/plugins/sidebar/wato.py
+++ b/web/plugins/sidebar/wato.py
@@ -227,6 +227,8 @@ def render_wato_foldertree():
# Render link target selection
#
selected_topic, selected_target = config.load_user_file("foldertree", (_('Hosts'), 'allhosts'))
+ if type(selected_topic) == unicode:
+ selected_topic = selected_topic.encode("utf-8")
views.load_views()
dashboard.load_dashboards()
Module: check_mk
Branch: master
Commit: 6304099c0f6ab24a4f67fff5105d68aad7c6a493
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6304099c0f6ab2…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Tue Mar 3 15:36:51 2015 +0100
Fixed some typos
---
web/plugins/wato/check_parameters.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 9f74ac8..369aea4 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -3563,7 +3563,7 @@ register_check_parameters(
"humidity",
_("Humidity Levels"),
Tuple(
- help = _("This Rulset sets the threshold limits for humidity sensors"),
+ help = _("This Ruleset sets the threshold limits for humidity sensors"),
elements = [
Integer(title = _("Critical at or below"), unit="%" ),
Integer(title = _("Warning at or below"), unit="%" ),
@@ -3581,7 +3581,7 @@ register_check_parameters(
"single_humidity",
_("Humidity Levels for devices with a single sensor"),
Tuple(
- help = _("This Rulset sets the threshold limits for humidity sensors"),
+ help = _("This Ruleset sets the threshold limits for humidity sensors"),
elements = [
Integer(title = _("Critical at or below"), unit="%" ),
Integer(title = _("Warning at or below"), unit="%" ),
@@ -3974,7 +3974,7 @@ register_check_parameters(
title = _("Handling for required mirror space"),
totext = "",
choices = [
- ( False, _("Disregard required mirror space as free space")),
+ ( False, _("Do not regard required mirror space as free space")),
( True, _("Regard required mirror space as free space")),],
help = _("ASM calculates the free space depending on free_mb or required mirror "
"free space. Enable this option to set the check against required "
Module: check_mk
Branch: master
Commit: d81055942e27b341d805adcaf3c48122026a78c1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d81055942e27b3…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Mar 3 15:00:53 2015 +0100
updated werk description
---
.werks/2052 | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/.werks/2052 b/.werks/2052
index 6ece51a..b5e646c 100644
--- a/.werks/2052
+++ b/.werks/2052
@@ -21,6 +21,7 @@ of each interface.<br>
If you have used the configuration option <tt>if_inventory_uses_alias</tt>, the
interface will now have a different name. Therefore the service description changes
and the performance data will get lost.<br>
-A workaround for this problem is to use <tt>if_inventory_uses_description</tt> instead....
-For windows hosts the settings <tt>if_inventory_uses_alias</tt> and <tt>if_inventory_uses_description</tt>
-meant the same in previous version. With this update the meaning of <tt>if_inventory_uses_alias</tt> has changed.
+A workaround for this problem is to use <tt>if_inventory_uses_description</tt> instead.<br>
+For windows hosts the setting <tt>if_inventory_uses_alias</tt> and <tt>if_inventory_uses_description</tt>
+meant the same in previous versions. With this update only the meaning of <tt>if_inventory_uses_alias</tt> has changed.
+
Module: check_mk
Branch: master
Commit: 1e70f153da7b984bffd7e866a7e7a68df200cc6b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1e70f153da7b98…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Mar 3 14:56:55 2015 +0100
The winperf_if check is now able to detect teamed interfaces.
This information is provided by the updated wmic_if.ps1 plugin.
Right now, the teamed interfaces are no longer listed separately.
There will be a configuration option soon which allows you to configure
this behaviour.
H2: Incompatible change:
The service descriptions for this check did never show the human
readable/editable interface name - the <i>NetConnectionID</i>.
This has been fixed. This information is now provided in the alias information
of each interface.<br>
If you have used the configuration option <tt>if_inventory_uses_alias</tt>, the
interface will now have a different name. Therefore the service description changes
and the performance data will get lost.<br>
A workaround for this problem is to use <tt>if_inventory_uses_description</tt> instead....
For windows hosts the settings <tt>if_inventory_uses_alias</tt> and <tt>if_inventory_uses_description</tt>
meant the same in previous version. With this update the meaning of <tt>if_inventory_uses_alias</tt> has changed.
---
.werks/2052 | 26 +++++++++++++++++
ChangeLog | 2 ++
checks/winperf_if | 82 +++++++++++++++++++++++++++++++++++++----------------
3 files changed, 85 insertions(+), 25 deletions(-)
diff --git a/.werks/2052 b/.werks/2052
new file mode 100644
index 0000000..6ece51a
--- /dev/null
+++ b/.werks/2052
@@ -0,0 +1,26 @@
+Title: winperf_if: Now able to automatically group teamed interfaces and more
+Level: 2
+Component: checks
+Compatible: incomp
+Version: 1.2.7i1
+Date: 1425390249
+Class: feature
+
+The winperf_if check is now able to detect teamed interfaces.
+This information is provided by the updated wmic_if.ps1 plugin.
+
+Right now, the teamed interfaces are no longer listed separately.
+There will be a configuration option soon which allows you to configure
+this behaviour.
+
+H2: Incompatible change
+The service descriptions for this check did never show the human
+readable/editable interface name - the <i>NetConnectionID</i>.
+This has been fixed. This information is now provided in the alias information
+of each interface.<br>
+If you have used the configuration option <tt>if_inventory_uses_alias</tt>, the
+interface will now have a different name. Therefore the service description changes
+and the performance data will get lost.<br>
+A workaround for this problem is to use <tt>if_inventory_uses_description</tt> instead....
+For windows hosts the settings <tt>if_inventory_uses_alias</tt> and <tt>if_inventory_uses_description</tt>
+meant the same in previous version. With this update the meaning of <tt>if_inventory_uses_alias</tt> has changed.
diff --git a/ChangeLog b/ChangeLog
index 993d7d5..a799ab2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -102,6 +102,8 @@
* 1952 check_mk_agent.linux: integrated runas plugin into check_mk_agent.linux...
* 2083 Added Siemens PLC (SPS) monitoring...
* 1893 cisco_power: Now discovers all power supplies, not only redundant ones...
+ * 2052 winperf_if: Now able to automatically group teamed interfaces and more...
+ NOTE: Please refer to the migration notes!
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checks/winperf_if b/checks/winperf_if
index eb67c56..2c9627e 100644
--- a/checks/winperf_if
+++ b/checks/winperf_if
@@ -62,7 +62,7 @@
def convert_winperf_if(info):
def canonize_nic_name(n):
- return n.replace("_", " ").replace(" ", " ")
+ return n.replace("_", " ").replace(" ", " ").rstrip()
lines = iter(info)
lines.next() # skip line with timestamp and counter number
@@ -70,9 +70,28 @@ def convert_winperf_if(info):
nics = dict([(n, {}) for n in nic_names])
# Scan lines with counters
+ is_teaming_line = False
+ teaming_headers = []
+ teaming_info = {}
+
try:
while True:
line = lines.next()
+
+ # Process teaming information
+ if line[0].startswith("[teaming_start]"):
+ is_teaming_line = True
+ teaming_headers = lines.next()
+ continue
+ elif line[0].startswith("[teaming_end]"):
+ is_teaming_line = False
+ continue
+ if is_teaming_line:
+ as_dict = dict(zip(teaming_headers, map(lambda x: x.rstrip(), line)))
+ for guid in as_dict["GUID"].split(";"):
+ teaming_info[guid] = as_dict
+ continue
+
counter = saveint(line[0])
if counter:
for nr, value in enumerate(line[1:len(nic_names)+1]):
@@ -83,14 +102,24 @@ def convert_winperf_if(info):
headers = line
while True:
line = lines.next()
- as_dict = dict(zip(headers, line))
- nic_name = canonize_nic_name(as_dict["Name"])
- try:
- conn_id = int(as_dict["NetConnectionID"].split()[-1])
- nic_name += " " + str(conn_id)
- except:
- pass
-
+ if line[0].startswith("[teaming_start]"):
+ is_teaming_line = True
+ teaming_headers = lines.next()
+ break
+
+ as_dict = dict(zip(headers, map(lambda x: x.rstrip(), line)))
+
+ # Unfortunately teamed interfaces loose their #x index and are no longer
+ # distinguishable with the data from the Win32_NetworkAdapter.
+ # Fortunately this index information is still available in the teaming section
+ # The GUID is used to combine the two datasets
+ guid = as_dict.get("GUID")
+ if guid in teaming_info:
+ guid_to_name = dict(zip(teaming_info[guid]["GUID"].split(";"),
+ teaming_info[guid]["MemberDescriptions"].split(";")))
+ nic_name = canonize_nic_name(guid_to_name[guid])
+ else:
+ nic_name = canonize_nic_name(as_dict["Name"])
def transform_name(name):
# Intel[R] PRO 1000 MT-Desktopadapter__3 (perf counter)
@@ -127,18 +156,9 @@ def convert_winperf_if(info):
found_match = True
break
else:
+ found_match = True
nic_name = mod_nic_name
- # The last straw. Try to find this the name as exact match in other fields
- if not found_match:
- for entry in [ "NetConnectionID", "InterfaceDescription" ]:
- if as_dict.get(entry):
- mod_nic_name = transform_name(as_dict.get(entry))
- if mod_nic_name in nic_names:
- nic_name = mod_nic_name
- found_match = True
- break
-
if not found_match:
# Ignore interfaces that do not have counters
continue
@@ -147,10 +167,11 @@ def convert_winperf_if(info):
except StopIteration:
pass
+
# Now convert the dicts into the format that is needed by if.include
converted = []
- # Sort NIC names are create artifical index
+ # Sort NIC names and create artifical index
nic_index = dict(map(lambda x: (x[1], x[0] + 1), enumerate(nic_names)))
nic_names.sort(reverse=True)
@@ -158,17 +179,28 @@ def convert_winperf_if(info):
nic = nics[nic_name]
mac_txt = nic.get('MACAddress')
bandwidth = saveint(nic.get('Speed'))
+ # Some interfaces report several exabyte as bandwidth when down..
+ if bandwidth > 1024**5:
+ # Greater than petabyte
+ bandwidth = 0
+
if mac_txt:
mac = "".join(map(lambda x: chr(int(x, 16)), mac_txt.split(':')))
else:
mac = ''
+
+ index_info = str(nic_index[nic_name])
+ # Automatically group teamed interfaces
+ if nic.get("GUID") in teaming_info:
+ index_info = ( teaming_info[nic.get("GUID")]["TeamName"], index_info )
+
converted.append((
- str(nic_index[nic_name]),
+ index_info,
nic_name,
"loopback" in nic_name.lower() and '24' or '6',
- bandwidth or nic[10], # Aktuelle Bandbreite
- # NetConnectionStatus: 2 st up, 7 ist 'not connected'. If the plugin
- # wmic_if is missing and we have link information we need to assume 'up':
+ bandwidth or nic[10], # Bandwidth
+ # NetConnectionStatus: 2 means 'up', 7 is 'not connected'. If the plugin
+ # wmic_if is missing and we have link information we have to assume 'up':
nic.get('NetConnectionStatus', '2') == '2' and '1' or '2',
nic[-246], # ifInOctets,
nic[14], # inucast
@@ -183,7 +215,7 @@ def convert_winperf_if(info):
nic[30], # ifOutDiscards
nic[32], # ifOutErrors
nic[34], # ifOutQLen
- nic_name,
+ nic.get('NetConnectionID', nic_name),
mac,
))