Module: check_mk
Branch: master
Commit: a48743f72004545c7ec9188850de602ed7a01717
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a48743f7200454…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Oct 7 13:27:56 2016 +0200
added missing manpages
---
checkman/gude_humidity | 18 ++++++++++++++++++
checkman/gude_relayport | 10 +++++++---
checkman/gude_temp | 18 ++++++++++++++++++
3 files changed, 43 insertions(+), 3 deletions(-)
diff --git a/checkman/gude_humidity b/checkman/gude_humidity
new file mode 100644
index 0000000..1c3b3d0
--- /dev/null
+++ b/checkman/gude_humidity
@@ -0,0 +1,18 @@
+title: GUDE Power Control: Humidity
+agents: snmp
+catalog: hw/other
+license: GPL
+distribution: check_mk
+description:
+ This check monitors humidity of a GUDE Power
+ Control device which supports GUDEADS-EPC1100-MIB or
+ -822X-MIB.
+
+ Upper default levels are set to 60, 70 percentage. These
+ levels are configurable
+
+item:
+ The sensor name.
+
+inventory:
+ One service is created.
diff --git a/checkman/gude_relayport b/checkman/gude_relayport
index ea41f61..83feea0 100644
--- a/checkman/gude_relayport
+++ b/checkman/gude_relayport
@@ -1,11 +1,15 @@
-title: GUDE Power Control: Relay port status
+title: GUDE Power Control: Relay port status and electricity
agents: snmp
catalog: hw/other
license: GPL
distribution: check_mk
description:
- This check monitors the ON/OFF state of a GUDE Power
- Control device which supports the GUDEADS-EPC1100-MIB.
+ This check monitors the ON/OFF state and electricity of a GUDE Power
+ Control device which supports the GUDEADS-EPC1100-MIB or
+ -822X-MIB.
+
+ Default levels are set to 220, 210 V, 15, 16 A and 3500, 3600 Wh.
+ These and other levels are configurable
item:
The relay port name.
diff --git a/checkman/gude_temp b/checkman/gude_temp
new file mode 100644
index 0000000..accf41b
--- /dev/null
+++ b/checkman/gude_temp
@@ -0,0 +1,18 @@
+title: GUDE Power Control: Temperature
+agents: snmp
+catalog: hw/other
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the temperature of a GUDE Power
+ Control device which supports the GUDEADS-EPC1100-MIB or
+ -822X-MIB.
+
+ Default levels are set to 35, 40 degree celsius. These
+ levels are configurable.
+
+item:
+ The sensor name.
+
+inventory:
+ One service is created.
Module: check_mk
Branch: master
Commit: 19e1d4ad0d35af0dc63893ea5c795dccb3ac5bc6
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=19e1d4ad0d35af…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Oct 7 13:19:14 2016 +0200
3912 elphase.include: now device states can be mapped to monitoring states
---
.werks/3912 | 9 +++++++++
ChangeLog | 1 +
checks/elphase.include | 15 +++++++++++++++
web/plugins/wato/check_parameters.py | 17 ++++++++++++++++-
4 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/.werks/3912 b/.werks/3912
new file mode 100644
index 0000000..c8857ad
--- /dev/null
+++ b/.werks/3912
@@ -0,0 +1,9 @@
+Title: elphase.include: now device states can be mapped to monitoring states
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i2
+Date: 1475839045
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index cbf207c..4ecdd6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
* 3841 cups_queues: thresholds are now configurable in WATO...
* 3910 oracle_instance: noarchivelog can now be ignored
* 3911 if.include: each operational state can now be mapped to a check state
+ * 3912 elphase.include: now device states can be mapped to monitoring states
* 3894 FIX: mkeventd_status: Fixed bug in case Event Console is not running
* 3907 FIX: oracle_tablespaces: simplyfied free space calculation depending on version...
* 3819 FIX: windows agent: fixed 2 bugs related to mrpe...
diff --git a/checks/elphase.include b/checks/elphase.include
index fe450ab..fa0e32d 100644
--- a/checks/elphase.include
+++ b/checks/elphase.include
@@ -32,6 +32,7 @@ def inventory_elphase(parsed):
# Parsed has the following form:
# parsed = {
# "Phase 1" : {
+# "device_state" : (1, "warning"), # overall device state: state, state readable
# "voltage" : (220.17, (1, "Voltage is too low")), # with device state
# "current" : 12.0, # without device state
# }
@@ -52,6 +53,20 @@ def check_elphase(item, params, parsed):
if params is None:
params = {}
+ if "device_state" in parsed[item]:
+ device_state, device_state_readable = parsed[item]["device_state"]
+ if params.get("map_device_states", []):
+ device_state_params = dict(params["map_device_states"])
+ if device_state in device_state_params:
+ state = device_state_params[device_state]
+ elif device_state_readable in device_state_params:
+ state = device_state_params[device_state_readable]
+ else:
+ state = 0
+ else:
+ state = device_state
+ yield state, "Device status: %s(%s)" % (device_state_readable, device_state)
+
for what, title, unit, bound, factor in [
( "voltage", "Voltage", " V", Bounds.Lower, 1),
( "current", "Current", " A", Bounds.Upper, 1),
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 1ca9b8b..e2c7056 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -10368,6 +10368,13 @@ register_check_parameters(
Integer(title = _("critical at"), unit = u"%", default_value = 90),
]
)),
+ ("map_device_states",
+ ListOf(Tuple(
+ elements = [ TextAscii(size=10), MonitoringState() ]),
+ title = _("Map device state"),
+ help = _("Here you can enter either device state number (eg. from SNMP devices) "
+ "or exact device state name and the related monitoring state."),
+ )),
]),
TextAscii(
title = _("Output Name"),
@@ -10383,7 +10390,15 @@ register_check_parameters(
help = _("This rule allows you to specify levels for the voltage, current, power "
"and apparent power of your device. The levels will only be applied if the device "
"actually supplies values for these parameters."),
- elements = phase_elements,
+ elements = phase_elements + [
+ ("map_device_states",
+ ListOf(Tuple(
+ elements = [ TextAscii(size=10), MonitoringState() ]),
+ title = _("Map device state"),
+ help = _("Here you can enter either device state number (eg. from SNMP devices) "
+ "or exact device state name and the related monitoring state."),
+ )),
+ ],
),
TextAscii(
title = _("Input Name"),
Module: check_mk
Branch: master
Commit: f20ce1d7d4d25f6f2aa1e64c572e20c51c81153e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f20ce1d7d4d25f…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Oct 7 10:32:08 2016 +0200
updated werk text
---
.werks/3911 | 2 +-
ChangeLog | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.werks/3911 b/.werks/3911
index 4638c5e..5149a28 100644
--- a/.werks/3911
+++ b/.werks/3911
@@ -1,4 +1,4 @@
-Title: if: each operational state can now be mapped to a check state
+Title: if.include: each operational state can now be mapped to a check state
Level: 1
Component: checks
Compatible: compat
diff --git a/ChangeLog b/ChangeLog
index 3a201eb..cbf207c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,7 +5,7 @@
Checks & Agents:
* 3841 cups_queues: thresholds are now configurable in WATO...
* 3910 oracle_instance: noarchivelog can now be ignored
- * 3911 if: each operational state can now be mapped to a check state
+ * 3911 if.include: each operational state can now be mapped to a check state
* 3894 FIX: mkeventd_status: Fixed bug in case Event Console is not running
* 3907 FIX: oracle_tablespaces: simplyfied free space calculation depending on version...
* 3819 FIX: windows agent: fixed 2 bugs related to mrpe...