Module: check_mk
Branch: master
Commit: bad5c6048ed3774e4bdc1d10a8277dac6781c5ac
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bad5c6048ed377…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Nov 10 08:14:19 2017 +0100
Tentative revert, trying to get CI back in shape.
Not sure if this is the real reason, but CI complained starting with the
first of the 2 commits:
Revert "df: Discovery test for the behaviour of the include volume name rule"
This reverts commit a604ad9f22efce8695f40631dc6579f02731bb51.
Revert "df: Rudimentary test for discovery"
This reverts commit 7a2f088b80a20367bfae7a62ee9eb40dbe255b5c.
If things are still broken after this revert, we can re-apply the patches.
---
tests/checks/test_df.py | 41 -----------------------------------------
1 file changed, 41 deletions(-)
diff --git a/tests/checks/test_df.py b/tests/checks/test_df.py
deleted file mode 100644
index 13bf982..0000000
--- a/tests/checks/test_df.py
+++ /dev/null
@@ -1,41 +0,0 @@
-import pytest
-import pprint
-import sys
-
-pytestmark = pytest.mark.check
-
-(a)pytest.mark.parametrize("info,result,include_volume_name", [
- ([], [], False),
- ([[u'/dev/sda4',
- u'ext4',
- u'143786696',
- u'101645524',
- u'34814148',
- u'75%',
- u'/'],
- [u'[df_inodes_start]'],
- [u'/dev/sda4', u'ext4', u'9142272', u'1654272', u'7488000', u'19%', u'/'],
- [u'[df_inodes_end]']], [(u'/', {})], False),
- ([[u'/dev/sda4',
- u'ext4',
- u'143786696',
- u'101645524',
- u'34814148',
- u'75%',
- u'/'],
- [u'[df_inodes_start]'],
- [u'/dev/sda4', u'ext4', u'9142272', u'1654272', u'7488000', u'19%', u'/'],
- [u'[df_inodes_end]']], [(u'/dev/sda4 /', {})], True),
-])
-def test_df_discovery_with_parse(check_manager, monkeypatch, info, result, include_volume_name):
- import cmk_base.checks
-
-# NOTE: This is the result of trying to mock the the ruleset variable itself instead of the
-# host_extra_conf_merged function. It did not work. Maybe we can get it to work at a later stage.
-# import cmk_base.rulesets
-# monkeypatch.setitem(cmk_base.checks._check_contexts["df"], "inventory_df_rules",
-# [({"include_volume_name": include_volume_name}, [], cmk_base.rulesets.ALL_HOSTS, {})])
-
- check = check_manager.get_check("df")
- monkeypatch.setitem(cmk_base.checks._check_contexts["df"], "host_extra_conf_merged", lambda _, __: {"include_volume_name": include_volume_name})
- assert check.run_discovery(check.run_parse(info)) == result
Module: check_mk
Branch: master
Commit: dad4190d391bb41f7880aebca3d71d62a9f465b4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dad4190d391bb4…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Thu Nov 9 10:09:48 2017 +0100
5354 FIX cmctc_lcp: Fixes an error leading to wrong inventory and check output
This werk fixes an error which caused that the inventory for some sensors
was not performed correctly. This resulted in a wrong amount of discovered
services and a wrong output (numbers and units) for these services .
Therefore, the services of the corresponding hosts have to be rediscovered.
Temperature sensors are not affected by this error. One other type of
sensor is not affected as well. Which sensor type it is might depend on the
used Python version. In tests using Python version 2.7.14 Blower sensors
were not affected.
Change-Id: I4c4d941006a2ea19acd42582359fd3f035b15a9c
---
.werks/5354 | 17 +++++++++++++++++
checks/cmctc_lcp | 34 ++++++++++++++++++++++++++--------
2 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/.werks/5354 b/.werks/5354
new file mode 100644
index 0000000..d52de1c
--- /dev/null
+++ b/.werks/5354
@@ -0,0 +1,17 @@
+Title: cmctc_lcp: Fixes an error leading to wrong inventory and check output
+Level: 1
+Component: checks
+Compatible: incomp
+Edition: cre
+Version: 1.5.0i1
+Date: 1510217496
+Class: fix
+
+This werk fixes an error which caused that the inventory for some sensors
+was not performed correctly. This resulted in a wrong amount of discovered
+services and a wrong output (numbers and units) for these services .
+Therefore, the services of the corresponding hosts have to be rediscovered.
+Temperature sensors are not affected by this error. One other type of
+sensor is not affected as well. Which sensor type it is might depend on the
+used Python version. In tests using Python version 2.7.14 Blower sensors
+were not affected.
diff --git a/checks/cmctc_lcp b/checks/cmctc_lcp
index 0637aeb..a16d8f3 100644
--- a/checks/cmctc_lcp
+++ b/checks/cmctc_lcp
@@ -174,15 +174,33 @@ snmp_info["cmctc_lcp"] = (
]
)
+check_info['cmctc_lcp.blower'] = {
+ "check_function" : lambda item,params,info: check_cmctc_lcp(item, params, info, 'blower'),
+ "inventory_function" : lambda info: inventory_cmctc_lcp(info, 'blower'),
+ "has_perfdata" : True,
+ "service_description" : "Blower %s",
+}
+
+check_info['cmctc_lcp.blowergrade'] = {
+ "check_function" : lambda item,params,info: check_cmctc_lcp(item, params, info, 'blowergrade'),
+ "inventory_function" : lambda info: inventory_cmctc_lcp(info, 'blowergrade'),
+ "has_perfdata" : True,
+ "service_description" : "Blower Grade %s",
+}
-for _s, _i in cmctc_lcp_sensortypes.items():
- if _s != "temp":
- check_info['cmctc_lcp.' + _s] = {
- "check_function" : lambda item,params,info: check_cmctc_lcp(item, params, info, _s),
- "inventory_function" : lambda info: inventory_cmctc_lcp(info, _s),
- "has_perfdata" : True,
- "service_description" : _i[1] + " %s",
- }
+check_info['cmctc_lcp.flow'] = {
+ "check_function" : lambda item,params,info: check_cmctc_lcp(item, params, info, 'flow'),
+ "inventory_function" : lambda info: inventory_cmctc_lcp(info, 'flow'),
+ "has_perfdata" : True,
+ "service_description" : "Waterflow %s",
+}
+
+check_info['cmctc_lcp.regulator'] = {
+ "check_function" : lambda item,params,info: check_cmctc_lcp(item, params, info, 'regulator'),
+ "inventory_function" : lambda info: inventory_cmctc_lcp(info, 'regulator'),
+ "has_perfdata" : True,
+ "service_description" : "Regulator %s",
+}
# temperature check is standardised
check_info['cmctc_lcp.temp'] = {
Module: check_mk
Branch: master
Commit: 616554fe8a4ef86a900ac6405596e6bd21137431
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=616554fe8a4ef8…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Nov 8 14:52:07 2017 +0100
5197 FIX Improved Event Console history performance
Due to architectural changes in Check_MK 1.4.0, the performance of querying
the event console history had suffered. This has been fixed, now time
ranges are used again to speed up common queries.
Change-Id: I676a91a6daa55c29d5980a14923572d20ca0e449
---
.werks/5197 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.werks/5197 b/.werks/5197
new file mode 100644
index 0000000..7e57ead
--- /dev/null
+++ b/.werks/5197
@@ -0,0 +1,12 @@
+Title: Improved Event Console history performance
+Level: 1
+Component: livestatus
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1510148949
+Class: fix
+
+Due to architectural changes in Check_MK 1.4.0, the performance of querying
+the event console history had suffered. This has been fixed, now time
+ranges are used again to speed up common queries.
Module: check_mk
Branch: master
Commit: a57816c0f866eec3baaca9bcf878cfa510a9459c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a57816c0f866ee…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Nov 8 14:42:56 2017 +0100
5240 FIX agent_netapp, environmental sensors monitoring. No longer fails if a node has no configured shelfes
This fixes the error message <tt>"NoneType" object has no attribute 'children_get'</tt>, reported by the check <tt>NetApp filer connection</tt>.
Change-Id: I5d27c07cf801012e14fef15326d1519a2e08d6d1
---
.werks/5240 | 13 +++++++++++++
agents/special/agent_netapp | 20 ++++++++++++--------
2 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/.werks/5240 b/.werks/5240
new file mode 100644
index 0000000..24ae476
--- /dev/null
+++ b/.werks/5240
@@ -0,0 +1,13 @@
+Title: agent_netapp, environmental sensors monitoring. No longer fails if a node has no configured shelfes
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1510148440
+
+This fixes the error message <tt>"NoneType" object has no attribute 'children_get'</tt>, reported by the check <tt>NetApp filer connection</tt>.
+
+
diff --git a/agents/special/agent_netapp b/agents/special/agent_netapp
old mode 100755
new mode 100644
index 77f2654..4a1d6c8
--- a/agents/special/agent_netapp
+++ b/agents/special/agent_netapp
@@ -985,9 +985,9 @@ try:
# Cluster info
# TODO: check is missing
+ ha_partners = {} # Used later on by environmental sensors
if "cf" not in licenses["v1_disabled"]:
cluster_status = query_nodes("cf-status", node_attribute = "node")
- ha_partners = {} # Used later on by environmental sensors
if cluster_status:
print "<<<netapp_api_cm_cluster:sep(9)>>>"
for node, entry in cluster_status.items():
@@ -1137,9 +1137,19 @@ try:
for node, values in environment_info.items():
if node in processed_nodes:
continue
+
+ # HA partners always report redundant environmental data.
+ # (Node1/Node2) <--Cluster--> (Node3/Node4)
+ # We skip data from Node2 and Node4.
+ processed_nodes.append(node)
+ if node in ha_partners:
+ processed_nodes.append(ha_partners[node])
+
channel_list = values.child_get("shelf-environ-channel-list")
+ if not channel_list:
+ continue
+
for channel in channel_list.children_get(): # cycle channel list
- shelf_list = channel.child_get("shelf-environ-shelf-list")
for shelf in channel.child_get("shelf-environ-shelf-list").children_get(): # cycle shelf list
shelf_id = shelf.child_get_string("shelf-id")
for what, section in [ ("power-supply-list", "netapp_api_psu"),
@@ -1148,12 +1158,6 @@ try:
print "<<<%s:sep(9)>>>" % section
node = shelf.child_get(what)
print format_config(node, what, shelf_id)
- # HA partners always report redundant environmental data.
- # (Node1/Node2) <--Cluster--> (Node3/Node4)
- # We skip data from Node2 and Node4.
- processed_nodes.append(node)
- if node in ha_partners:
- processed_nodes.append(ha_partners[node])
# Controller Status