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..."),
Module: check_mk
Branch: master
Commit: f5f24e1c5370572a8f04708963942af5e136fc88
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f5f24e1c537057…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Thu Apr 10 12:06:53 2014 +0200
ibm_svc_portfc: New check for status of FC Ports in IBM SVC / Storwize V3700 / V7000 devices
---
.werks/804 | 8 ++++
ChangeLog | 1 +
agents/special/agent_ibmsvc | 11 ++++--
checkman/ibm_svc_portfc | 22 +++++++++++
checks/ibm_svc_portfc | 63 +++++++++++++++++++++++++++++++
web/plugins/wato/datasource_programs.py | 3 +-
6 files changed, 103 insertions(+), 5 deletions(-)
diff --git a/.werks/804 b/.werks/804
new file mode 100644
index 0000000..d706792
--- /dev/null
+++ b/.werks/804
@@ -0,0 +1,8 @@
+Title: ibm_svc_portfc: New check for status of FC Ports in IBM SVC / Storwize V3700 / V7000 devices
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1397124376
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 8e4293a..c783c60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,7 @@
* 0879 windows_tasks: output last and next run time
* 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
* 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 91b4e07..d7347df 100755
--- a/agents/special/agent_ibmsvc
+++ b/agents/special/agent_ibmsvc
@@ -61,10 +61,11 @@ OPTIONS:
-i MODULES, --modules MODULES Modules to query. This is a comma separated list of
which may contain the keywords "lshost", "lslicense",
"lsmdisk", "lsmdiskgrp", "lsnode", "lsnodestats",
- "lssystem", "lssystemstats", "lseventlog" 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".
+ "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".
""")
@@ -110,6 +111,8 @@ 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,
+ "command" : "lsportfc -nohdr -delim :"},
}
for o,a in opts:
diff --git a/checkman/ibm_svc_portfc b/checkman/ibm_svc_portfc
new file mode 100644
index 0000000..0421b7c
--- /dev/null
+++ b/checkman/ibm_svc_portfc
@@ -0,0 +1,22 @@
+title: IBM SVC / Storwize V3700 / V7000: Status of FC Ports
+agents: ibm_svc
+catalog: hw/storagehw/ibm
+license: GPL
+distribution: check_mk
+description:
+ Checks the status of FC Ports in an IBM SVC / Storwize V3700 / V7000
+ device.
+
+ Status {active} is {OK}, every other status is {CRIT}.
+
+ 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 FC Port.
+
+inventory:
+ Creates one check for every FC Port in the IBM SVC / Storwize V3700 / V7000 device
+ with status {active}.
diff --git a/checks/ibm_svc_portfc b/checks/ibm_svc_portfc
new file mode 100644
index 0000000..6b96782
--- /dev/null
+++ b/checks/ibm_svc_portfc
@@ -0,0 +1,63 @@
+#!/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_portfc:sep(58)>>>
+# 0:1:1:fc:8Gb:1:node1:5005076803042126:030400:active:switch
+# 1:2:2:fc:8Gb:1:node1:5005076803082126:040400:active:switch
+# 2:3:3:fc:N/A:1:node1:50050768030C2126:000000:inactive_unconfigured:none
+# 3:4:4:fc:N/A:1:node1:5005076803102126:000000:inactive_unconfigured:none
+# 8:1:1:fc:8Gb:2:node2:5005076803042127:030500:active:switch
+# 9:2:2:fc:8Gb:2:node2:5005076803082127:040500:active:switch
+# 10:3:3:fc:N/A:2:node2:50050768030C2127:000000:inactive_unconfigured:none
+# 11:4:4:fc:N/A:2:node2:5005076803102127:000000:inactive_unconfigured:none
+
+def inventory_ibm_svc_portfc(info):
+ inventory = []
+ for fc_port_id, fc_io_port_id, port_id, fc_port_type, port_speed, \
+ node_id, node_name, WWPN, nportid, fc_port_status, attachment in info:
+ if fc_port_status == "active":
+ inventory.append( (fc_port_id, None) )
+ return inventory
+
+def check_ibm_svc_portfc(item, _no_params, info):
+ for fc_port_id, fc_io_port_id, port_id, fc_port_type, port_speed, \
+ node_id, node_name, WWPN, nportid, fc_port_status, attachment in info:
+ if fc_port_id == item:
+ if fc_port_status == "active":
+ return 0, "FC Port %s is %s" % (fc_port_id, fc_port_status)
+ else:
+ return 2, "FC Port %s is %s" % (fc_port_id, fc_port_status)
+
+ return 3, "FC Port %s not found in agent output" % item
+
+check_info["ibm_svc_portfc"] = {
+ "check_function" : check_ibm_svc_portfc,
+ "inventory_function" : inventory_ibm_svc_portfc,
+ "service_description" : "IBM SVC FC Port %s",
+ "has_perfdata" : False,
+}
+
diff --git a/web/plugins/wato/datasource_programs.py b/web/plugins/wato/datasource_programs.py
index 990095a..dc3e306 100644
--- a/web/plugins/wato/datasource_programs.py
+++ b/web/plugins/wato/datasource_programs.py
@@ -274,9 +274,10 @@ register_rule(group,
( "lssystem", _("System Info") ),
( "lssystemstats", _("System Stats") ),
( "lseventlog", _("Event Log") ),
+ ( "lsportfc", _("FC Ports") ),
],
default_value = [ "lshost", "lslicense", "lsmdisk", "lsmdiskgrp", "lsnode",
- "lsnodestats", "lssystem", "lssystemstats", ],
+ "lsnodestats", "lssystem", "lssystemstats", "lsportfc" ],
allow_empty = False,
),
title = _("Retrieve information about..."),
Module: check_mk
Branch: master
Commit: 032e786dc41a645fb56338d68174999703297600
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=032e786dc41a64…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Apr 10 12:05:16 2014 +0200
FIX check_bi_local.py: fix crash in case of non-ascii characters
When you have an aggregate whos name contain a non-ascii character then
the <tt>check_bi_local.py</tt> would fail and you would miss all aggregates
from the point on. This has been fixed by encoding the output with UTF-8.
---
.werks/882 | 11 +++++++++++
ChangeLog | 1 +
doc/treasures/localchecks/check_bi_local.py | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/882 b/.werks/882
new file mode 100644
index 0000000..df31e44
--- /dev/null
+++ b/.werks/882
@@ -0,0 +1,11 @@
+Title: check_bi_local.py: fix crash in case of non-ascii characters
+Level: 2
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i3
+Date: 1397124240
+
+When you have an aggregate whos name contain a non-ascii character then
+the <tt>check_bi_local.py</tt> would fail and you would miss all aggregates
+from the point on. This has been fixed by encoding the output with UTF-8.
diff --git a/ChangeLog b/ChangeLog
index 8e4293a..c2f97f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,7 @@
* 0604 FIX: windows_updates: now handles situations with forced reboot and no limits correctly
* 0605 FIX: enterasys_cpu_util enterasys_lsnat: syntax fixes
* 0889 FIX: logwatch: fix case where rule wouldn't be applied...
+ * 0882 FIX: check_bi_local.py: fix crash in case of non-ascii characters...
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled by filter)
diff --git a/doc/treasures/localchecks/check_bi_local.py b/doc/treasures/localchecks/check_bi_local.py
index 1f7963a..4ebdef7 100755
--- a/doc/treasures/localchecks/check_bi_local.py
+++ b/doc/treasures/localchecks/check_bi_local.py
@@ -112,5 +112,5 @@ for name, state, output in data[1:]:
text = "%d %s - %s" % (state_nr, descr, state)
if output:
text += " - " + output
- print text
+ print text.encode("utf-8")
Module: check_mk
Branch: master
Commit: 3cc59390d568d096c5c5d4ad7ec845bc91b1ce3c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3cc59390d568d0…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Thu Apr 10 10:41:02 2014 +0200
clarified help texts of interface and switch port inventory rule
---
web/plugins/wato/check_parameters.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 5fe4377..15918e0 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -255,14 +255,14 @@ register_rule(group + '/' + subgroup_inventory,
default_value = [ '6', '32', '62', '117' ]
)),
("rmon", Checkbox(
- title = _("RMON statistics data"),
- help = _("If you enable this option then for every switch port an additional service will be created "
- "that is always OK and collects RMON data. This will give you detailed information about "
- "the distribution about the packet sizes that are transferred over the port. Note: currently "
+ title = _("Collect RMON statistics data"),
+ help = _("If you enable this option, for every RMON capable switch port an additional service will "
+ "be created which is always OK and collects RMON data. This will give you detailed information "
+ "about the distribution of packet sizes transferred over the port. Note: currently "
"this extra RMON check does not honor the inventory settings for switch ports. In a future "
- "version of Check_MK RMON data will be added to the normal interface service and not add "
+ "version of Check_MK RMON data may be added to the normal interface service and not add "
"an additional service."),
- label = _("Create extra service with RMON statistics data"),
+ label = _("Create extra service with RMON statistics data (if available for the device)"),
)),
],
help = _('This rule can be used to control the inventory for network ports. '