Module: check_mk
Branch: master
Commit: 7b6607952fdc76426b4ad0035cd524929516a8d1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7b6607952fdc76…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Apr 11 11:33:02 2014 +0200
moved werk 773 to correct release
---
.werks/773 | 2 +-
ChangeLog | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.werks/773 b/.werks/773
index 583c2a7..5e20ed7 100644
--- a/.werks/773
+++ b/.werks/773
@@ -1,7 +1,7 @@
Title: ibm_svc_system: new check for System Info of IBM SVC / V7000 devices
Level: 1
Component: checks
-Version: 1.2.5i1
+Version: 1.2.5i2
Date: 1396002652
Class: feature
diff --git a/ChangeLog b/ChangeLog
index acdcaf6..ea85dc4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -63,6 +63,7 @@
1.2.5i2:
Checks & Agents:
* 0147 enterasys_fans: New Check to monitor fans of enterasys swichtes
+ * 0773 ibm_svc_system: new check for System Info of IBM SVC / V7000 devices
* 0774 ibm_svc_nodestats.diskio: new check for disk troughput per node on IBM SVC / V7000 devices
* 0775 ibm_svc_systemstats.diskio: new check for disk throughput in IBM SVC / V7000 devices in total
* 0764 lnx_quota: Added new check to monitor Linux File System Quota...
@@ -224,7 +225,6 @@
* 0770 innovaphone_licenses: New check to monitor licenses on innovaphone devices"
* 0771 juniper_trpz_aps: Show the number of connected access points on juniper wlan controllers
* 0772 added special agent for IBM SVC / V7000 storage systems...
- * 0773 ibm_svc_system: new check for System Info of IBM SVC / V7000 devices
* 0147 enterasys_fans: New Check to monitor fans of enterasys swichtes
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
Module: check_mk
Branch: master
Commit: 2be69dfe5ced7005ce76ebcdf1634e5c1b7b1e79
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2be69dfe5ced70…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Apr 11 09:49:51 2014 +0200
ibm_svc_enclosurestats.power: New check for power consumption of enclosures of IBM SVC / Storwize V3700 / V7000 devices
---
.werks/807 | 8 +++++
ChangeLog | 1 +
checkman/ibm_svc_enclosurestats.power | 24 ++++++++++++++
checks/ibm_svc_enclosurestats | 35 ++++++++++++++++++++
.../check_mk-ibm_svc_enclosurestats.power.php | 35 ++++++++++++++++++++
web/plugins/perfometer/check_mk.py | 6 ++++
6 files changed, 109 insertions(+)
diff --git a/.werks/807 b/.werks/807
new file mode 100644
index 0000000..7846f1e
--- /dev/null
+++ b/.werks/807
@@ -0,0 +1,8 @@
+Title: ibm_svc_enclosurestats.power: New check for power consumption of enclosures of IBM SVC / Storwize V3700 / V7000 devices
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1397202560
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 302cf17..acdcaf6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,7 @@
* 0804 ibm_svc_portfc: New check for status of FC Ports in IBM SVC / Storwize V3700 / V7000 devices
* 0805 ibm_svc_enclosure: New Check for Enclosures, Canisters and PSUs in IBM SVC / Storwize V3700 / V7000 devices
* 0806 ibm_svc_enclosurestats.temp: New Check for temperature in enclosures of IBM SVC / Storwize V3700 / V7000 devices
+ * 0807 ibm_svc_enclosurestats.power: New check for power consumption of enclosures of IBM SVC / Storwize V3700 / V7000 devices
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
diff --git a/checkman/ibm_svc_enclosurestats.power b/checkman/ibm_svc_enclosurestats.power
new file mode 100644
index 0000000..586f07a
--- /dev/null
+++ b/checkman/ibm_svc_enclosurestats.power
@@ -0,0 +1,24 @@
+title: IBM SVC / Storwize V3700 / V7000: Power Consumption of Enclosures
+agents: ibm_svc
+catalog: hw/storagehw/ibm
+license: GPL
+distribution: check_mk
+description:
+ Displays the power consumption of enclosures of an IBM SVC / Storwize V3700 / V7000
+ device in watt.
+
+ The check is only for reporting and returns always {OK}.
+
+ Please note: You need the Special Agent agent_ibmsvc to retrieve the monitoring
+ data from the device. Your monitoring user must be able to SSH to the device
+ with SSH Key Authentification. Please exchange SSH key. The Special Agent itself
+ can be configured by WATO.
+
+item:
+ The ID of the enclosure.
+
+inventory:
+ Creates one check per enclosure.
+
+perfdata:
+ One value: The power consumption in watt.
diff --git a/checks/ibm_svc_enclosurestats b/checks/ibm_svc_enclosurestats
index 6dcd670..4483a54 100644
--- a/checks/ibm_svc_enclosurestats
+++ b/checks/ibm_svc_enclosurestats
@@ -84,3 +84,38 @@ check_info["ibm_svc_enclosurestats.temp"] = {
}
#.
+# .--power---------------------------------------------------------------.
+# | |
+# | _ __ _____ _____ _ __ |
+# | | '_ \ / _ \ \ /\ / / _ \ '__| |
+# | | |_) | (_) \ V V / __/ | |
+# | | .__/ \___/ \_/\_/ \___|_| |
+# | |_| |
+# '----------------------------------------------------------------------'
+
+def inventory_ibm_svc_enclosurestats_power(info):
+ inventory = []
+ for enclosure_id, stat_name, stat_current, stat_peak, stat_peak_time in info:
+ if stat_name == "power_w":
+ inventory.append( (enclosure_id, None) )
+ return inventory
+
+def check_ibm_svc_enclosurestats_power(item, _no_params, info):
+ perfdata = []
+
+ for enclosure_id, stat_name, stat_current, stat_peak, stat_peak_time in info:
+ if enclosure_id == item and stat_name == "power_w":
+ stat_current = int(stat_current)
+ perfdata = [ ('power', str(stat_current)+"Watt") ]
+ return 0, "Enclosure %s Power Consumption is %s Watt" % (enclosure_id, stat_current), perfdata
+
+ return 3, "Power for enclosure %s not found in agent output" % item
+
+check_info["ibm_svc_enclosurestats.power"] = {
+ "check_function" : check_ibm_svc_enclosurestats_power,
+ "inventory_function" : inventory_ibm_svc_enclosurestats_power,
+ "service_description" : "IBM SVC Power Enclosure %s",
+ "has_perfdata" : True,
+}
+
+#.
diff --git a/pnp-templates/check_mk-ibm_svc_enclosurestats.power.php b/pnp-templates/check_mk-ibm_svc_enclosurestats.power.php
new file mode 100644
index 0000000..07c03e5
--- /dev/null
+++ b/pnp-templates/check_mk-ibm_svc_enclosurestats.power.php
@@ -0,0 +1,35 @@
+<?php
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+$opt[1] = "--vertical-label \"Watt\" -l 0 -u 60 --title \"$hostname / $servicedesc\" ";
+
+$def[1] = "DEF:var1=$RRDFILE[1]:$DS[1]:MAX ";
+$def[1] .= "AREA:var1#800040:\"Power\:\" ";
+$def[1] .= "GPRINT:var1:LAST:\"%2.0lfW\" ";
+$def[1] .= "LINE1:var1#800040:\"\" ";
+$def[1] .= "GPRINT:var1:MAX:\"(Max\: %2.0lfW,\" ";
+$def[1] .= "GPRINT:var1:AVERAGE:\"Avg\: %2.0lfW)\" ";
+
+?>
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 8a1290f..0738ddb 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -918,6 +918,12 @@ def perfometer_check_mk_ibm_svc_cache(row, check_command, perf_data):
perfometers["check_mk-ibm_svc_nodestats.cache"] = perfometer_check_mk_ibm_svc_cache
perfometers["check_mk-ibm_svc_systemstats.cache"] = perfometer_check_mk_ibm_svc_cache
+def perfometer_check_mk_ibm_svc_power(row, check_command, perf_data):
+ watt = int(perf_data[0][1])
+ text = "%s Watt" % watt
+ return text, perfometer_logarithmic(watt, 150, 2, "#60f020")
+perfometers["check_mk-ibm_svc_enclosurestats.power"] = perfometer_check_mk_ibm_svc_power
+
def perfometer_licenses_percent(row, check_command, perf_data):
licenses = float(perf_data[0][1])
max_avail = float(perf_data[0][5])
Module: check_mk
Branch: master
Commit: 1d3f72fa843c425fbe76de2bbfa206b5f90338be
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1d3f72fa843c42…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Thu Apr 10 17:29:02 2014 +0200
ibm_svc_*: added V3700 to all check manpages because checks are known to work for this device too
---
checkman/ibm_svc_eventlog | 8 ++++----
checkman/ibm_svc_host | 7 ++++---
checkman/ibm_svc_license | 6 +++---
checkman/ibm_svc_mdisk | 7 ++++---
checkman/ibm_svc_mdiskgrp | 8 +++++---
checkman/ibm_svc_node | 7 ++++---
checkman/ibm_svc_nodestats.cache | 4 ++--
checkman/ibm_svc_nodestats.cpu_util | 5 +++--
checkman/ibm_svc_nodestats.diskio | 4 ++--
checkman/ibm_svc_nodestats.iops | 4 ++--
10 files changed, 33 insertions(+), 27 deletions(-)
diff --git a/checkman/ibm_svc_eventlog b/checkman/ibm_svc_eventlog
index 006b209..86d7cd6 100644
--- a/checkman/ibm_svc_eventlog
+++ b/checkman/ibm_svc_eventlog
@@ -1,11 +1,11 @@
-title: IBM SVC / V7000: Messages in Event log
+title: IBM SVC / Storwize V3700 / V7000: Messages in Event log
agents: ibm_svc
catalog: hw/storagehw/ibm
license: GPL
distribution: check_mk
description:
- Checks the event log of IBM SVC / V7000 devices for messsages not expired
- and not yet fixed. Returns {WARN} if there is at least one and {OK} if
+ Checks the event log of IBM SVC / Storwize V3700 / V7000 devices for messsages
+ not expired and not yet fixed. Returns {WARN} if there is at least one and {OK} if
there is none.
Please note: You need the Special Agent agent_ibmsvc to retrieve the monitoring
@@ -14,5 +14,5 @@ description:
can be configured by WATO.
inventory:
- Creates exactly one check on every IBM SVC / V7000 device named
+ Creates exactly one check on every IBM SVC / Storwize V3700 / V7000 device named
IBM SVC Eventlog.
diff --git a/checkman/ibm_svc_host b/checkman/ibm_svc_host
index 5e78d0c..d7b0f4f 100644
--- a/checkman/ibm_svc_host
+++ b/checkman/ibm_svc_host
@@ -1,10 +1,11 @@
-title: IBM SVC / V7000: Status of Hosts Connected
+title: IBM SVC / Storwize V3700 / V7000: Status of Hosts Connected
agents: ibm_svc
catalog: hw/storagehw/ibm
license: GPL
distribution: check_mk
description:
- Checks the status of hosts an IBM SVC / V7000 presents volumes to.
+ Checks the status of hosts an IBM SVC / Storwize V3700 / V7000 presents volumes
+ to.
If there are only hosts reporting status {active}, {online} or {inactive}
the check returns {OK}. If there are hosts reporting {degraded} status or
@@ -21,5 +22,5 @@ perfdata:
active, inactive, degraded, offline and unidentified status.
inventory:
- Creates exactly one check for every IBM SVC / V7000 named
+ Creates exactly one check for every IBM SVC / Storwize V3700 / V7000 named
IBM SVC Hosts.
diff --git a/checkman/ibm_svc_license b/checkman/ibm_svc_license
index bf40d7a..ded98fd 100644
--- a/checkman/ibm_svc_license
+++ b/checkman/ibm_svc_license
@@ -1,11 +1,11 @@
-title: IBM SVC / V7000: Licensing Status
+title: IBM SVC / Storwize V3700 / V7000: Licensing Status
agents: ibm_svc
catalog: hw/storagehw/ibm
license: GPL
distribution: check_mk
description:
- For every licensed feature on an IBM SVC / V7000 device, the number
- of licenses is compared to the usage of licenses. The check returns
+ For every licensed feature on an IBM SVC / Storwize V3700 / V7000 device, the
+ number of licenses is compared to the usage of licenses. The check returns
{CRIT} if the usage is higher than the licensing and {OK} otherwise.
Please note: You need the Special Agent agent_ibmsvc to retrieve the monitoring
diff --git a/checkman/ibm_svc_mdisk b/checkman/ibm_svc_mdisk
index d8f4703..2129077 100644
--- a/checkman/ibm_svc_mdisk
+++ b/checkman/ibm_svc_mdisk
@@ -1,10 +1,11 @@
-title: IBM SVC / V7000: Status and Mode of MDisks
+title: IBM SVC / Storwize V3700 / V7000: Status and Mode of MDisks
agents: ibm_svc
catalog: hw/storagehw/ibm
license: GPL
distribution: check_mk
description:
- Checks the status and mode of MDisks in an IBM SVC / V7000 device.
+ Checks the status and mode of MDisks in an IBM SVC / Storwize V3700 / V7000
+ device.
Status {online} is {OK}, status {offline} and {excluded} are {CRIT} and
every other status is {WARN}.
@@ -22,4 +23,4 @@ item:
The name of the MDisk.
inventory:
- Creates one check for every MDisk in th IBM SVC / V7000 device.
+ Creates one check for every MDisk in th IBM SVC / Storwize V3700 / V7000 device.
diff --git a/checkman/ibm_svc_mdiskgrp b/checkman/ibm_svc_mdiskgrp
index c89bf11..69aabdf 100644
--- a/checkman/ibm_svc_mdiskgrp
+++ b/checkman/ibm_svc_mdiskgrp
@@ -1,10 +1,11 @@
-title: IBM SVC / V7000: Status and Usage of MDisksGrps
+title: IBM SVC / Storwize V3700 / V7000: Status and Usage of MDisksGrps
agents: ibm_svc
catalog: hw/storagehw/ibm
license: GPL
distribution: check_mk
description:
- Checks the status and usage of MDisksGrps in an IBM SVC / V7000 device.
+ Checks the status and usage of MDisksGrps in an IBM SVC / Storwize V3700 / V7000
+ device.
It uses the check logic of the {df} check, so for configuration parameters
and examples please refer to the man page of {df}.
@@ -21,7 +22,8 @@ item:
The name of the MDisksGrp
inventory:
- Creates one check for every MDiskGrp in th IBM SVC / V7000 device.
+ Creates one check for every MDiskGrp in th IBM SVC / Storwize V3700 / V7000
+ device.
examples:
# set levels for the MDiskGrp Quorum_1 to 90% for WARN and 95% for CRIT
diff --git a/checkman/ibm_svc_node b/checkman/ibm_svc_node
index 95d4a43..2ad6669 100644
--- a/checkman/ibm_svc_node
+++ b/checkman/ibm_svc_node
@@ -1,10 +1,10 @@
-title: IBM SVC / V7000: Status of IO Groups
+title: IBM SVC / Storwize V3700 / V7000: Status of IO Groups
agents: ibm_svc
catalog: hw/storagehw/ibm
license: GPL
distribution: check_mk
description:
- Checks the status of IO Groups of an IBM SVC / V7000 device.
+ Checks the status of IO Groups of an IBM SVC / Storwize V3700 / V7000 device.
If all nodes of an IO Group report status {online} the check returns
{OK}. If all nodes of an IO Group report some other status (e. g.
@@ -20,4 +20,5 @@ item:
The name of the IO Group.
inventory:
- Creates one check for every IO Group in an IBM SVC / V7000 device.
+ Creates one check for every IO Group in an IBM SVC / Storwize V3700 / V7000
+ device.
diff --git a/checkman/ibm_svc_nodestats.cache b/checkman/ibm_svc_nodestats.cache
index 29c70a1..bdcb848 100644
--- a/checkman/ibm_svc_nodestats.cache
+++ b/checkman/ibm_svc_nodestats.cache
@@ -1,11 +1,11 @@
-title: IBM SVC / V7000: Cache Usage per Node
+title: IBM SVC / Storwize V3700 / V7000: Cache Usage per Node
agents: ibm_svc
catalog: hw/storagehw/ibm
license: GPL
distribution: check_mk
description:
Reports the Write Cache Usage and Total Cache Usage for each node of an
- IBM SVC / V7000 device in percent.
+ IBM SVC / Storwize V3700 / V7000 device in percent.
The check does report only and returns always {OK}.
diff --git a/checkman/ibm_svc_nodestats.cpu_util b/checkman/ibm_svc_nodestats.cpu_util
index 1ce05b7..869c80c 100644
--- a/checkman/ibm_svc_nodestats.cpu_util
+++ b/checkman/ibm_svc_nodestats.cpu_util
@@ -1,10 +1,11 @@
-title: IBM SVC / V7000: CPU Utilization per Node
+title: IBM SVC / Storwize V3700 / V7000: CPU Utilization per Node
agents: ibm_svc
catalog: hw/storagehw/ibm
license: GPL
distribution: check_mk
description:
- Reports the CPU Utilization for each node of an IBM SVC / V7000 device.
+ Reports the CPU Utilization for each node of an IBM SVC / Storwize V3700 / V7000
+ device.
The check returns {WARN} or {CRIT} if the utilization in percent is higher
then given levels and {OK} otherwise.
diff --git a/checkman/ibm_svc_nodestats.diskio b/checkman/ibm_svc_nodestats.diskio
index aa018fd..ce39a72 100644
--- a/checkman/ibm_svc_nodestats.diskio
+++ b/checkman/ibm_svc_nodestats.diskio
@@ -1,11 +1,11 @@
-title: IBM SVC / V7000: Disk Throughput for Drives/MDisks/VDisks per Node
+title: IBM SVC / Storwize V3700 / V7000: Disk Throughput for Drives/MDisks/VDisks per Node
agents: ibm_svc
catalog: hw/storagehw/ibm
license: GPL
distribution: check_mk
description:
Reports the disk throughput for Drives, MDisks and VDisks for each node
- of an IBM SVC / V7000 device in bytes per second.
+ of an IBM SVC / Storwize V3700 / V7000 device in bytes per second.
The check is only for reporting and returns always {OK}.
diff --git a/checkman/ibm_svc_nodestats.iops b/checkman/ibm_svc_nodestats.iops
index b0a78bc..61f5bc6 100644
--- a/checkman/ibm_svc_nodestats.iops
+++ b/checkman/ibm_svc_nodestats.iops
@@ -1,11 +1,11 @@
-title: IBM SVC / V7000: IO operations/sec for Drives/MDisks/VDisks per Node
+title: IBM SVC / Storwize V3700 / V7000: IO operations/sec for Drives/MDisks/VDisks per Node
agents: ibm_svc
catalog: hw/storagehw/ibm
license: GPL
distribution: check_mk
description:
Reports the IO operations per second for Drives, MDisks and VDisks for each node
- of an IBM SVC / V7000 device.
+ of an IBM SVC / Storwize V3700 / V7000 device.
The check is only for reporting and returns always {OK}.
Module: check_mk
Branch: master
Commit: 3e66c0cabad9b9676e711a64ee7c1aa3a7ed3a9f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3e66c0cabad9b9…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Thu Apr 10 13:03:34 2014 +0200
ibm_svc_enclosure: New Check for Enclosures, Canisters and PSUs in IBM SVC / Storwize V3700 / V7000 devices
---
.werks/805 | 8 +++
ChangeLog | 1 +
agents/special/agent_ibmsvc | 12 +++--
checkman/ibm_svc_enclosure | 22 +++++++++
checks/ibm_svc_enclosure | 82 +++++++++++++++++++++++++++++++
web/plugins/wato/datasource_programs.py | 4 +-
6 files changed, 123 insertions(+), 6 deletions(-)
diff --git a/.werks/805 b/.werks/805
new file mode 100644
index 0000000..45353f8
--- /dev/null
+++ b/.werks/805
@@ -0,0 +1,8 @@
+Title: ibm_svc_enclosure: New Check for Enclosures, Canisters and PSUs in IBM SVC / Storwize V3700 / V7000 devices
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1397127773
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 9559a88..b9b0279 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@
* 0881 rmon_stats: now needs to be activated via a rule in order to be inventorized...
NOTE: Please refer to the migration notes!
* 0804 ibm_svc_portfc: New check for status of FC Ports in IBM SVC / Storwize V3700 / V7000 devices
+ * 0805 ibm_svc_enclosure: New Check for Enclosures, Canisters and PSUs in IBM SVC / Storwize V3700 / V7000 devices
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
diff --git a/agents/special/agent_ibmsvc b/agents/special/agent_ibmsvc
index d7347df..5ff2e88 100755
--- a/agents/special/agent_ibmsvc
+++ b/agents/special/agent_ibmsvc
@@ -62,10 +62,10 @@ OPTIONS:
which may contain the keywords "lshost", "lslicense",
"lsmdisk", "lsmdiskgrp", "lsnode", "lsnodestats",
"lssystem", "lssystemstats", "lseventlog", "lsportfc"
- or "all" to define which information should be
- queried from the device. You can define to use only
- view of them to optimize performance. The default is
- "all".
+ "lsenclosure" or "all" to define which information
+ should be queried from the device. You can define to
+ use only view of them to optimize performance. The
+ default is "all".
""")
@@ -111,8 +111,10 @@ command_options = {
"command" : "lssystemstats -nohdr -delim :"},
"lseventlog" : {"section_header" : "ibm_svc_eventlog", "active" : False,
"command" : "lseventlog -expired no -fixed no -monitoring no -order severity -message no -delim : -nohdr"},
- "lsportfc" : {"section_header" : "ibm_svc_portfc", "active" : False,
+ "lsportfc" : {"section_header" : "ibm_svc_portfc", "active" : False,
"command" : "lsportfc -nohdr -delim :"},
+ "lsenclosure" : {"section_header" : "ibm_svc_enclosure", "active" : False,
+ "command" : "lsenclosure -nohdr -delim :"},
}
for o,a in opts:
diff --git a/checkman/ibm_svc_enclosure b/checkman/ibm_svc_enclosure
new file mode 100644
index 0000000..3314256
--- /dev/null
+++ b/checkman/ibm_svc_enclosure
@@ -0,0 +1,22 @@
+title: IBM SVC / Storwize V3700 / V7000: Status of Enclosures, Canisters and PSUs
+agents: ibm_svc
+catalog: hw/storagehw/ibm
+license: GPL
+distribution: check_mk
+description:
+ Checks the status of Enclosures, Canisters and PSUs in an IBM SVC / Storwize V3700 /
+ V7000 device.
+
+ Returns {OK} if the Enclousure report status {online} and all Canisters and PSUs
+ are online and {CRIT} otherwise.
+
+ Please note: You need the Special Agent agent_ibmsvc to retrieve the monitoring
+ data from the device. Your monitoring user must be able to SSH to the device
+ with SSH Key Authentification. Please exchange SSH key. The Special Agent itself
+ can be configured by WATO.
+
+item:
+ The ID of the enclosure.
+
+inventory:
+ Creates one check for every enclosure.
diff --git a/checks/ibm_svc_enclosure b/checks/ibm_svc_enclosure
new file mode 100644
index 0000000..2d3907e
--- /dev/null
+++ b/checks/ibm_svc_enclosure
@@ -0,0 +1,82 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+# Example output from agent:
+# <<<ibm_svc_enclosure:sep(58)>>>
+# 1:online:control:yes:0:io_grp0:2072-24C:7804037:2:2:2:2:24
+# 2:online:expansion:yes:0:io_grp0:2072-24E:7804306:2:2:2:2:24
+# 3:online:expansion:yes:0:io_grp0:2072-24E:7804326:2:2:2:2:24
+# 4:online:expansion:yes:0:io_grp0:2072-24E:7804352:2:2:2:2:24
+
+def inventory_ibm_svc_enclosure(info):
+ inventory = []
+ for enclosure_id, enclosure_status, enclosure_type, managed, IO_group_id, \
+ IO_group_name, product_MTM, serial_number, total_canisters, online_canisters, \
+ total_PSUs, online_PSUs, drive_slots in info:
+ inventory.append( (enclosure_id, None) )
+ return inventory
+
+def check_ibm_svc_enclosure(item, _no_params, info):
+ for enclosure_id, enclosure_status, enclosure_type, managed, IO_group_id, \
+ IO_group_name, product_MTM, serial_number, total_canisters, online_canisters, \
+ total_PSUs, online_PSUs, drive_slots in info:
+ if enclosure_id == item:
+
+ # Check status
+ message = "Enclosure %s is %s" % (enclosure_id, enclosure_status)
+ if enclosure_status == "online":
+ status = 0
+ else:
+ status = 2
+ message += "(!!)"
+
+ # Check canisters
+ if online_canisters == total_canisters:
+ status = max(0, status)
+ message += ", all %s canisters are online" % total_canisters
+ else:
+ status = max(2, status)
+ message += ", %s(!!) of %s canisters are online" % (online_canisters, total_canisters)
+
+ # Check PSUs
+ if online_PSUs == total_PSUs:
+ status = max(0, status)
+ message += ", all %s PSUs are online" % total_PSUs
+ else:
+ status = max(2, status)
+ message += ", %s(!!) of %s PSUs are online" % (online_PSUs, total_PSUs)
+
+ return status, message
+
+ return 3, "Enclosure %s not found in agent output" % item
+
+check_info["ibm_svc_enclosure"] = {
+ "check_function" : check_ibm_svc_enclosure,
+ "inventory_function" : inventory_ibm_svc_enclosure,
+ "service_description" : "IBM SVC Enclosure %s",
+ "has_perfdata" : False,
+}
+
diff --git a/web/plugins/wato/datasource_programs.py b/web/plugins/wato/datasource_programs.py
index dc3e306..00fa7ae 100644
--- a/web/plugins/wato/datasource_programs.py
+++ b/web/plugins/wato/datasource_programs.py
@@ -275,9 +275,11 @@ register_rule(group,
( "lssystemstats", _("System Stats") ),
( "lseventlog", _("Event Log") ),
( "lsportfc", _("FC Ports") ),
+ ( "lsenclosure", _("Enclosures") ),
],
default_value = [ "lshost", "lslicense", "lsmdisk", "lsmdiskgrp", "lsnode",
- "lsnodestats", "lssystem", "lssystemstats", "lsportfc" ],
+ "lsnodestats", "lssystem", "lssystemstats", "lsportfc",
+ "lsenclosure" ],
allow_empty = False,
),
title = _("Retrieve information about..."),