Module: check_mk
Branch: master
Commit: 52771916f046a2ab84a9030bcdef5e3010cdeb6e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=52771916f046a2…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Thu Feb 6 09:59:23 2014 +0100
emc_datadomain_fans, emc_datadomain_power, emc_datadomain_nvbat,
emc_datadomain_temps now have a man page plus a small bug fix
for cases when they report a state not documented in the MIB
---
checkman/emc_datadomain_fans | 22 ++++++++++++++++++++++
checkman/emc_datadomain_nvbat | 22 ++++++++++++++++++++++
checkman/emc_datadomain_power | 19 +++++++++++++++++++
checkman/emc_datadomain_temps | 23 +++++++++++++++++++++++
checks/emc_datadomain_fans | 4 ++--
checks/emc_datadomain_nvbat | 4 ++--
checks/emc_datadomain_power | 4 ++--
checks/emc_datadomain_temps | 4 ++--
8 files changed, 94 insertions(+), 8 deletions(-)
diff --git a/checkman/emc_datadomain_fans b/checkman/emc_datadomain_fans
new file mode 100644
index 0000000..70ffde0
--- /dev/null
+++ b/checkman/emc_datadomain_fans
@@ -0,0 +1,22 @@
+title: EMC Datadomain: fan status
+agents: snmp
+catalog: hw/storagehw/emc
+license: GPL
+distribution: check_mk
+description:
+ Reports the status of the fans of the EMC Datadomain
+ Deduplication Storage Systems. The state is {OK} when the status
+ of the fan as reported by the device is {1=OK}, it is {WARN}
+ when the status of the device is reported to be {0=notfound},
+ and it is {CRIT} when the device reports its status as {2=Fail}.
+
+item:
+ "ID of the enclosure" - "ID of the fan"
+
+perfdata:
+ The fan level measured by the sensor. This can only be unknown,
+ low, medium or high
+
+inventory:
+ Automatically configures one check for every fan found on the
+ device
diff --git a/checkman/emc_datadomain_nvbat b/checkman/emc_datadomain_nvbat
new file mode 100644
index 0000000..e57429c
--- /dev/null
+++ b/checkman/emc_datadomain_nvbat
@@ -0,0 +1,22 @@
+title: EMC Datadomain: Battery Status of NVRAM
+agents: snmp
+catalog: hw/storagehw/emc
+license: GPL
+distribution: check_mk
+description:
+ Reports the status of the batteries on NVRAM cards of the EMC Datadomain
+ Deduplication Storage Systems. The state of the check is determined from
+ the state which is reported by the device as follows:
+ The check is {OK} when the device reports {0=ok}. The check is {WARN}
+ when the device reports {1=disabled} or {3=softdisabled}. The check is
+ {CRIT} when the device reports {2=discharged}.
+
+item:
+ "ID of the NVRAM card" - "ID of the battery on this card"
+
+perfdata:
+ The electrical charge of the battery in percent
+
+inventory:
+ Automatically configures one check for every NVRAM battery found on the
+ device
diff --git a/checkman/emc_datadomain_power b/checkman/emc_datadomain_power
new file mode 100644
index 0000000..6ccd165
--- /dev/null
+++ b/checkman/emc_datadomain_power
@@ -0,0 +1,19 @@
+title: EMC Datadomain: Power Modules
+agents: snmp
+catalog: hw/storagehw/emc
+license: GPL
+distribution: check_mk
+description:
+ Reports the status of the power modules of the EMC Datadomain
+ Deduplication Storage Systems. The state of the check is {OK}
+ when the state reported by the device is {0=Absent} or {1=OK}.
+ The state of the check is {WARN} when device reports a state of
+ {4=ACNone}. The state is {CRIT} when the device reports a state
+ of {2=Failed} or {3=Faulty}.
+
+item:
+ "ID of the enclosure" - "ID of the module"
+
+inventory:
+ Automatically configures one check for every power module found on the
+ device
diff --git a/checkman/emc_datadomain_temps b/checkman/emc_datadomain_temps
new file mode 100644
index 0000000..ea5c7d1
--- /dev/null
+++ b/checkman/emc_datadomain_temps
@@ -0,0 +1,23 @@
+title: EMC Datadomain: Temperature Sensors
+agents: snmp
+catalog: hw/storagehw/emc
+license: GPL
+distribution: check_mk
+description:
+ Reports the status of the temperature sensors of the EMC Datadomain
+ Deduplication Storage Systems. The state of the check is determined
+ from the state reported by the device as follows:
+ The check is {OK} when the sensor reports {1=OK}. The check is {WARN}
+ when the sensor device reports a state of {0=Failed}, {3=OverheatWarning}
+ or {2=Notfound}. The check is {CRIT} when the sensor reports a state of
+ {4=OverheatCritical}.
+
+item:
+ "ID of the enclosure" - "ID of the sensor"
+
+perfdata:
+ The temperatur measured by the sensor
+
+inventory:
+ Automatically configures one check for every sensor found on the
+ device
diff --git a/checks/emc_datadomain_fans b/checks/emc_datadomain_fans
index e95f708..cf2b538 100644
--- a/checks/emc_datadomain_fans
+++ b/checks/emc_datadomain_fans
@@ -46,8 +46,8 @@ def check_emc_datadomain_fans(item, _no_params, info):
dev_descr = line[2]
dev_level = line[3]
dev_state = line[4]
- dev_state_str = state_table.get(dev_state, "Unknown")[0]
- dev_state_rc = state_table.get(dev_state, 3)[1]
+ dev_state_str = state_table.get(dev_state, ("Unknown",3))[0]
+ dev_state_rc = state_table.get(dev_state, ("Unknown",3))[1]
dev_level_str = fan_level.get(dev_level, "Unknown")
infotext = "%s %s RPM %s" % ( dev_descr, dev_state_str,
dev_level_str )
return dev_state_rc, infotext
diff --git a/checks/emc_datadomain_nvbat b/checks/emc_datadomain_nvbat
index 4ef059d..d577b3c 100644
--- a/checks/emc_datadomain_nvbat
+++ b/checks/emc_datadomain_nvbat
@@ -41,8 +41,8 @@ def check_emc_datadomain_nvbat(item, _no_params, info):
if item == line[0]+"-"+line[1]:
dev_charge = line[3]
dev_state = line[2]
- dev_state_str = state_table.get(dev_state, "Unknown")[0]
- dev_state_rc = state_table.get(dev_state, 3)[1]
+ dev_state_str = state_table.get(dev_state, ("Unknown",3))[0]
+ dev_state_rc = state_table.get(dev_state, ("Unknown",3))[1]
infotext = "Status %s Charge Level %s%%" % ( dev_state_str,
dev_charge )
perfdata = [('charge', dev_charge+"%" )]
return dev_state_rc, infotext, perfdata
diff --git a/checks/emc_datadomain_power b/checks/emc_datadomain_power
index eaa5a39..b138fdd 100644
--- a/checks/emc_datadomain_power
+++ b/checks/emc_datadomain_power
@@ -43,8 +43,8 @@ def check_emc_datadomain_power(item, _no_params, info):
if item == line[0]+"-"+line[1]:
dev_descr = line[2]
dev_state = line[3]
- dev_state_str = state_table.get(dev_state,"Unknown")[0]
- dev_state_rc = state_table.get(dev_state,3)[1]
+ dev_state_str = state_table.get(dev_state,("Unknown",3))[0]
+ dev_state_rc = state_table.get(dev_state,("Unknown",3))[1]
infotext = "%s Status %s" % ( dev_descr, dev_state_str )
return dev_state_rc, infotext
diff --git a/checks/emc_datadomain_temps b/checks/emc_datadomain_temps
index 3e301ea..f1535e3 100644
--- a/checks/emc_datadomain_temps
+++ b/checks/emc_datadomain_temps
@@ -43,8 +43,8 @@ def check_emc_datadomain_temps(item, _no_params, info):
dev_temp = line[3]
dev_descr = line[2]
dev_state = line[4]
- dev_state_str = state_table.get(dev_state, "Unknown")[0]
- dev_state_rc = state_table.get(dev_state, 3)[1]
+ dev_state_str = state_table.get(dev_state, ("Unknown",3))[0]
+ dev_state_rc = state_table.get(dev_state, ("Unknown",3))[1]
infotext = "%s Temperature %sC Status %s" % ( dev_descr, dev_temp,
dev_state_str )
perfdata = [('temp', dev_temp+"C" )]
return dev_state_rc, infotext,perfdata