Module: check_mk
Branch: master
Commit: 76d4ca4286c4b9653eda65475b8036620351ce40
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=76d4ca4286c4b9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 7 10:09:37 2015 +0100
#2861 FIX hivemanager_devices: Fixed configuration of states to treat as WARN
---
.werks/2861 | 10 ++++++++++
ChangeLog | 1 +
checks/hivemanager_devices | 10 ++--------
web/plugins/wato/check_parameters.py | 2 +-
4 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/.werks/2861 b/.werks/2861
new file mode 100644
index 0000000..7379c23
--- /dev/null
+++ b/.werks/2861
@@ -0,0 +1,10 @@
+Title: hivemanager_devices: Fixed configuration of states to treat as WARN
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1449479346
+
+
diff --git a/ChangeLog b/ChangeLog
index 8ab52d8..c0ec42c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -140,6 +140,7 @@
* 1310 FIX: blade_bx_powerfan: Check now uses better default leves...
* 2807 FIX: check_mail_loop: POP3 protocol wasn't working at all
* 2808 FIX: db2_connections: added missing connections performance data
+ * 2861 FIX: hivemanager_devices: Fixed configuration of states to treat as WARN
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/hivemanager_devices b/checks/hivemanager_devices
index b6751ed..e3052fb 100644
--- a/checks/hivemanager_devices
+++ b/checks/hivemanager_devices
@@ -31,7 +31,6 @@
#BBSA-WIFI-LSN-Hald-F2-1|24|Cleared|True|57 Days, 3 Hrs 24 Mins 22 Secs
-
factory_settings['hivemanger_devices'] = {
'alert_on_loss' : True,
'max_clients' : (25, 50),
@@ -48,7 +47,6 @@ def check_hivemanager_devices(item, params, info):
for line in info:
infos = dict([ x.split('::') for x in line ])
if infos['hostName'] == item:
-
# Check for Alarm State
alarmstate = "Alarm state: " + infos['alarm']
if infos['alarm'] in params['warn_states']:
@@ -76,7 +74,6 @@ def check_hivemanager_devices(item, params, info):
else:
yield 0, infotext, perfdata
-
# Uptime
state = 0
warn, crit = 0, 0
@@ -100,9 +97,8 @@ def check_hivemanager_devices(item, params, info):
additional_informations = [
'eth0LLDPPort', 'eth0LLDPSysName', 'hive',
'hiveOS', 'hwmodel',
'serialNumber', 'nodeId', 'location',
'networkPolicy']
- yield 0, ", ".join(["%s: %s" % (x,y ) for x, y in
infos.items() \
- if x in additional_informations ])
-
+ yield 0, ", ".join(["%s: %s" % (x, y) for x, y in
infos.items() \
+ if x in additional_informations and y !=
"-"])
check_info["hivemanager_devices"] = {
@@ -112,6 +108,4 @@ check_info["hivemanager_devices"] = {
"default_levels_variable" : "hivemanger_devices",
"group" : "hivemanager_devices",
"has_perfdata" : True,
-
}
-
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index a2e9b37..8997979 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -2433,7 +2433,7 @@ register_check_parameters(
totext = "",
title = _("Do not alert on connection loss"),
)),
- ( "war_states",
+ ( "warn_states",
ListChoice(
title = _("States treated as warning"),
choices = hivemanger_states,