Module: check_mk
Branch: master
Commit: 21406af93f1c1eb186ac97c9a101d4aa9a7f08b2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=21406af93f1c1e…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Wed Apr 30 12:40:20 2014 +0200
ibm_svc_array: New check for Status of RAID Arrays in IBM SVC / Storwize devices.
---
.werks/952 | 8 ++++
ChangeLog | 1 +
agents/special/agent_ibmsvc | 7 ++-
checkman/ibm_svc_array | 26 +++++++++++
checks/ibm_svc_array | 71 +++++++++++++++++++++++++++++++
web/plugins/wato/datasource_programs.py | 5 ++-
6 files changed, 114 insertions(+), 4 deletions(-)
diff --git a/.werks/952 b/.werks/952
new file mode 100644
index 0000000..2b51cf5
--- /dev/null
+++ b/.werks/952
@@ -0,0 +1,8 @@
+Title: ibm_svc_array: New check for Status of RAID Arrays in IBM SVC / Storwize devices.
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1398854374
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 3cc3a5b..5cf1b1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,7 @@
* 0156 akcp_daisy_temp: New Check for akcp daisyTemp sensor chains...
* 0899 enterasys_temp: New Check for temperature sensor in Enterasys Switches
* 0901 ibm_svc_portfc: more devices recognized...
+ * 0952 ibm_svc_array: New check for Status of RAID Arrays in IBM SVC / Storwize 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 8be2635..ba51bba 100755
--- a/agents/special/agent_ibmsvc
+++ b/agents/special/agent_ibmsvc
@@ -62,8 +62,9 @@ OPTIONS:
which may contain the keywords "lshost", "lslicense",
"lsmdisk", "lsmdiskgrp", "lsnode", "lsnodestats",
"lssystem", "lssystemstats", "lseventlog", "lsportfc"
- "lsenclosure", "lsenclosurestats" or "all" to define
- which information should be queried from the device.
+ "lsenclosure", "lsenclosurestats", "lsarray" 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".
@@ -117,6 +118,8 @@ command_options = {
"command" : "lsenclosure -nohdr -delim :"},
"lsenclosurestats" : {"section_header" : "ibm_svc_enclosurestats", "active" : False,
"command" : "lsenclosurestats -nohdr -delim :"},
+ "lsarray" : {"section_header" : "ibm_svc_array", "active" : False,
+ "command" : "lsarray -nohdr -delim :"},
}
for o,a in opts:
diff --git a/checkman/ibm_svc_array b/checkman/ibm_svc_array
new file mode 100644
index 0000000..0324051
--- /dev/null
+++ b/checkman/ibm_svc_array
@@ -0,0 +1,26 @@
+title: IBM SVC / Storwize V3700 / V7000: Status of RAID Arrays
+agents: ibm_svc
+catalog: hw/storagehw/ibm
+license: GPL
+distribution: check_mk
+description:
+ Checks the status of RAID Arrays in an IBM SVC / Storwize V3700 / V7000
+ device.
+
+ Status {online} is {OK}, status {offline} and {degraded} are {CRIT} and
+ every other status is {WARN}.
+
+ Other informations given in the check output is just informational and
+ does not trigger any state change.
+
+ 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 RAID Array as delivered by lsarray command.
+
+inventory:
+ Creates one check for every RAID Array on the IBM SVC / Storwize V3700 / V7000
+ device.
diff --git a/checks/ibm_svc_array b/checks/ibm_svc_array
new file mode 100644
index 0000000..19c114b
--- /dev/null
+++ b/checks/ibm_svc_array
@@ -0,0 +1,71 @@
+#!/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_array:sep(58)>>>
+# 27:SSD_mdisk27:online:1:POOL_0_V7000_RZ:372.1GB:online:raid1:1:256:generic_ssd
+# 28:SSD_mdisk28:online:2:POOL_1_V7000_BRZ:372.1GB:online:raid1:1:256:generic_ssd
+# 29:SSD_mdisk0:online:1:POOL_0_V7000_RZ:372.1GB:online:raid1:1:256:generic_ssd
+# 30:SSD_mdisk1:online:2:POOL_1_V7000_BRZ:372.1GB:online:raid1:1:256:generic_ssd
+
+
+def inventory_ibm_svc_array(info):
+ inventory = []
+ for mdisk_id, mdisk_name, mdisk_status, mdisk_grp_id, mdisk_grp_name, capacity, \
+ raid_status, raid_level, redundancy, strip_size, tier in info:
+ inventory.append( (mdisk_id, None) )
+ return inventory
+
+def check_ibm_svc_array(item, _no_params, info):
+ status = 3
+ for mdisk_id, mdisk_name, mdisk_status, mdisk_grp_id, mdisk_grp_name, capacity, \
+ raid_status, raid_level, redundancy, strip_size, tier in info:
+ if mdisk_id == item:
+
+ # Check raid_status
+ message = "RAID Array %s reports status %s" % (item, raid_status)
+ if raid_status == "online":
+ status = 0
+ elif raid_status == "offline" or raid_status == "degraded":
+ status = 2
+ message += "(!!)"
+ else:
+ status = 1
+ message += "(!)"
+
+ # add information
+ message += ", RAID Level: %s, Tier: %s" % (raid_level, tier)
+
+ return status, message
+ return 3, "RAID Array %s not found in agent output" % item
+
+check_info["ibm_svc_array"] = {
+ "check_function" : check_ibm_svc_array,
+ "inventory_function" : inventory_ibm_svc_array,
+ "service_description" : "IBM SVC RAID Array %s",
+ "has_perfdata" : False,
+}
+
diff --git a/web/plugins/wato/datasource_programs.py b/web/plugins/wato/datasource_programs.py
index a69cec5..7cb00e5 100644
--- a/web/plugins/wato/datasource_programs.py
+++ b/web/plugins/wato/datasource_programs.py
@@ -40,7 +40,7 @@ register_rule(group,
"via SSH. The command line may contain the placeholders <tt><IP></tt> and "
"<tt><HOST></tt>."),
label = _("Command line to execute"),
- empty_text = _("Access Check_MK Agent via TCP"),
+ empty_text = _("Access Check_MK Agent via TCP"),
size = 80,
attrencode = True))
@@ -277,10 +277,11 @@ register_rule(group,
( "lsportfc", _("FC Ports") ),
( "lsenclosure", _("Enclosures") ),
( "lsenclosurestats", _("Enclosure Stats") ),
+ ( "lsarray", _("RAID Arrays") ),
],
default_value = [ "lshost", "lslicense", "lsmdisk", "lsmdiskgrp", "lsnode",
"lsnodestats", "lssystem", "lssystemstats", "lsportfc",
- "lsenclosure", "lsenclosurestats" ],
+ "lsenclosure", "lsenclosurestats", "lsarray" ],
allow_empty = False,
),
title = _("Retrieve information about..."),
Module: check_mk
Branch: master
Commit: 4ae7aeca29a48389811b4c7cfcefccde5ea9784f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4ae7aeca29a483…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Wed Apr 30 11:36:50 2014 +0200
ibm_svc_portfc: more devices recognized
some devices provide more information if running the lsportfc command
(especially: privide an additional field "cluster_use")
The check now works with these devices too.
---
.werks/901 | 10 ++++++++++
ChangeLog | 1 +
checks/ibm_svc_portfc | 39 ++++++++++++++++++++++++++++-----------
3 files changed, 39 insertions(+), 11 deletions(-)
diff --git a/.werks/901 b/.werks/901
new file mode 100644
index 0000000..8e9807f
--- /dev/null
+++ b/.werks/901
@@ -0,0 +1,10 @@
+Title: ibm_svc_portfc: more devices recognized
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1398850437
+Class: feature
+
+some devices provide more information if running the lsportfc command
+(especially: privide an additional field "cluster_use")
+The check now works with these devices too.
diff --git a/ChangeLog b/ChangeLog
index c93bcb8..1545b37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,7 @@
* 0898 ibm_svc_nodestats.disk_latency, ibm_svc_systemstats.disk_latency: New Checks for Disk Latency in IBM SVC / Storwize V3700 / V7000 devices
* 0156 akcp_daisy_temp: New Check for akcp daisyTemp sensor chains...
* 0899 enterasys_temp: New Check for temperature sensor in Enterasys Switches
+ * 0901 ibm_svc_portfc: more devices recognized...
* 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/checks/ibm_svc_portfc b/checks/ibm_svc_portfc
index 6b96782..50a4792 100644
--- a/checks/ibm_svc_portfc
+++ b/checks/ibm_svc_portfc
@@ -24,6 +24,8 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+# Output may have 11 fields:
+# id:fc_io_port_id:port_id:type:port_speed:node_id:node_name:WWPN:nportid:status:attachment
# Example output from agent:
# <<<ibm_svc_portfc:sep(58)>>>
# 0:1:1:fc:8Gb:1:node1:5005076803042126:030400:active:switch
@@ -34,23 +36,38 @@
# 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
+#
+# Output may have 12 fields:
+# id:fc_io_port_id:port_id:type:port_speed:node_id:node_name:WWPN:nportid:status:attachment:cluster_use
+# Example output from agent:
+# <<<ibm_svc_portfc:sep(58)>>>
+# 0:1:1:fc:8Gb:1:node1:5005076803042126:030400:active:switch:local_partner
+# 1:2:2:fc:8Gb:1:node1:5005076803082126:040400:active:switch:local_partner
+# 2:3:3:fc:N/A:1:node1:50050768030C2126:000000:inactive_unconfigured:none:local_partner
+# 3:4:4:fc:N/A:1:node1:5005076803102126:000000:inactive_unconfigured:none:local_partner
+# 8:1:1:fc:8Gb:2:node2:5005076803042127:030500:active:switch:local_partner
+# 9:2:2:fc:8Gb:2:node2:5005076803082127:040500:active:switch:local_partner
+# 10:3:3:fc:N/A:2:node2:50050768030C2127:000000:inactive_unconfigured:none:local_partner
+# 11:4:4:fc:N/A:2:node2:5005076803102127:000000:inactive_unconfigured:none:local_partner
+
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) )
+ for line in info:
+ if len(line) in (11, 12) and line[9] == "active":
+ inventory.append( (line[0], 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)
+ for line in info:
+ if len(line) in (11, 12):
+ fc_port_id = line[0]
+ fc_port_status = line[9]
+ 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
Module: check_mk
Branch: master
Commit: 1e92570b55126498d3cae8ae737e751cd5429340
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1e92570b551264…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Apr 29 14:12:32 2014 +0200
Updated bug entries #0844
---
.bugs/844 | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/.bugs/844 b/.bugs/844
new file mode 100644
index 0000000..8e93610
--- /dev/null
+++ b/.bugs/844
@@ -0,0 +1,8 @@
+Title: apc_rackpdu_power does not work with inline snmp
+Component: checks
+State: open
+Date: 2014-04-29 14:11:04
+Targetversion: 1.2.5i1
+Class: bug
+
+The check apc_rackpdu_power does not work with inline snmp, the first value in the snmp_info list (1.1.0) is missing, only the other 3 are queried.