sansymphony_ports,sansymphony_serverstatus,sansymphony_virtualdiskstatus:
New Checks for Datacore Sansymphony
Message-ID: <54fd9c8d.95++TRjYoPTwXhJN%bk(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 42025e46358aaff76ecddbc9291cd101275ab3e3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=42025e46358aaf…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Mar 9 14:13:45 2015 +0100
#1225 sansymphony_alerts,sansymphony_pool,sansymphony_ports,sansymphony_serverstatus,sansymphony_virtualdiskstatus: New Checks for Datacore Sansymphony
The new Checks need the agent Plugin sansymphony.ps1 configured with username in password to work.
Prerequisites
-------------
1. Datacore SANsymphony V8 or V9 must be installed
SANmelody and Sansymphony are not supported.
2. The SANsymphony CMDlets need to be installed on the monitored Datacore Server
If not installed you need to install the CMDlets with the SANsymphony V installation routine.
- Enabling of .net 4 Framwork support in PowerShell
Support for .net 4 must be enabled. To achieve this, create a file with the name powershell.exe.config with the following content:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727" />
</startup>
</configuration>
---
.werks/1225 | 27 +++++++++++++++++++++++++++
ChangeLog | 1 +
web/plugins/wato/check_parameters.py | 15 +++++++--------
3 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/.werks/1225 b/.werks/1225
new file mode 100644
index 0000000..6519ec4
--- /dev/null
+++ b/.werks/1225
@@ -0,0 +1,27 @@
+Title: sansymphony_alerts,sansymphony_pool,sansymphony_ports,sansymphony_serverstatus,sansymphony_virtualdiskstatus: New Checks for Datacore Sansymphony
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1425906288
+Class: feature
+
+The new Checks need the agent Plugin sansymphony.ps1 configured with username in password to work.
+
+Prerequisites
+-------------
+1. Datacore SANsymphony V8 or V9 must be installed
+SANmelody and Sansymphony are not supported.
+
+2. The SANsymphony CMDlets need to be installed on the monitored Datacore Server
+If not installed you need to install the CMDlets with the SANsymphony V installation routine.
+- Enabling of .net 4 Framwork support in PowerShell
+Support for .net 4 must be enabled. To achieve this, create a file with the name powershell.exe.config with the following content:
+
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <startup useLegacyV2RuntimeActivationPolicy="true">
+ <supportedRuntime version="v4.0"/>
+ <supportedRuntime version="v2.0.50727" />
+ </startup>
+</configuration>
diff --git a/ChangeLog b/ChangeLog
index d62f04b..d0566a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -115,6 +115,7 @@
* 1867 ibm_imm_voltage: new check to monitor power supply and CMS battery voltages on servers via IBMs IMM
* 2099 ibm_svc_portsas, ibm_svc_portfc: checks now have a more meaningful service description if the device firmware supports it...
NOTE: Please refer to the migration notes!
+ * 1225 sansymphony_alerts,sansymphony_pool,sansymphony_ports,sansymphony_serverstatus,sansymphony_virtualdiskstatus: New Checks for Datacore Sansymphony...
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index fd5bb6c..01a9565 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -6429,34 +6429,33 @@ register_check_parameters(
register_check_parameters(
subgroup_applications,
- "datacore_poolallocation",
- _("Datacore: pool allocation"),
+ "sansymphony_pool",
+ _("Sansymphony: pool allocation"),
Tuple(
- help = _("This rule sets the warn and crit levels for the number of allocated pools"),
+ help = _("This rule sets the warn and crit levels for the percentage of allocated pools"),
elements = [
Integer(
title = _("Warning at"),
- unit = _("pools"),
+ unit = _("percent"),
default_value = 80,
),
Integer(
title = _("Critical at"),
- unit = _("pools"),
+ unit = _("percent"),
default_value = 90,
),
]
),
TextAscii(
title = _("Name of the pool"),
- allow_empty = False,
),
"first"
)
register_check_parameters(
subgroup_applications,
- "datacore_alerts",
- _("Datacore: Number of unacknowlegded alerts"),
+ "sansymphony_alerts",
+ _("Sansymphony: Number of unacknowlegded alerts"),
Tuple(
help = _("This rule sets the warn and crit levels for the number of unacknowlegded alerts"),
elements = [
checks now have a more meaningful service description if the device
firmware supports it
Message-ID: <54fd7f7e.FYl8CnVGYxiur6UB%gg(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 1b09aef4bc48e9f51e63942eb832dc404bb6a8c7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1b09aef4bc48e9…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon Mar 9 12:09:31 2015 +0100
#2099 ibm_svc_portsas, ibm_svc_portfc: checks now have a more meaningful service description if the device firmware supports it
Please redo a service discovery
---
.werks/2099 | 10 ++++++++++
ChangeLog | 2 ++
checkman/ibm_svc_portfc | 4 +++-
checkman/ibm_svc_portsas | 3 ++-
checks/ibm_svc_portfc | 26 +++++++++++++++-----------
checks/ibm_svc_portsas | 36 ++++++++++++++++++++++++++++++++----
6 files changed, 64 insertions(+), 17 deletions(-)
diff --git a/.werks/2099 b/.werks/2099
new file mode 100644
index 0000000..d41aa56
--- /dev/null
+++ b/.werks/2099
@@ -0,0 +1,10 @@
+Title: ibm_svc_portsas, ibm_svc_portfc: checks now have a more meaningful service description if the device firmware supports it
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.7i1
+Date: 1425899308
+Class: feature
+
+Please redo a service discovery
+
diff --git a/ChangeLog b/ChangeLog
index 4ca21e1..d62f04b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -113,6 +113,8 @@
* 1894 hwg_humidity: New check to monitor humidity sensors attached to HWg-STE...
* 1866 ibm_imm_fan, ibm_imm_temp: new checks to monitor fans and temp sensors on IBM Servers via the IMM
* 1867 ibm_imm_voltage: new check to monitor power supply and CMS battery voltages on servers via IBMs IMM
+ * 2099 ibm_svc_portsas, ibm_svc_portfc: checks now have a more meaningful service description if the device firmware supports it...
+ NOTE: Please refer to the migration notes!
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checkman/ibm_svc_portfc b/checkman/ibm_svc_portfc
index 0421b7c..b5cd8f6 100644
--- a/checkman/ibm_svc_portfc
+++ b/checkman/ibm_svc_portfc
@@ -15,7 +15,9 @@ description:
can be configured by WATO.
item:
- The ID of the FC Port.
+ The item name is "Node <node_id> Slot <adapter_location> Port <adapter_port_id>"
+ or "Port <port_id>" for older versions of the device.
+
inventory:
Creates one check for every FC Port in the IBM SVC / Storwize V3700 / V7000 device
diff --git a/checkman/ibm_svc_portsas b/checkman/ibm_svc_portsas
index ff4e1d8..0b61534 100644
--- a/checkman/ibm_svc_portsas
+++ b/checkman/ibm_svc_portsas
@@ -15,7 +15,8 @@ description:
can be configured by WATO.
item:
- The ID of the SAS Port.
+ The item name is "Node <node_id> Slot <adapter_location> Port <adapter_port_id>"
+ or "Port <port_id>" for older versions of the device.
inventory:
Creates one check for every SAS Port in the IBM SVC / Storwize V3700 / V7000 device
diff --git a/checks/ibm_svc_portfc b/checks/ibm_svc_portfc
index bcae05f..b5894af 100644
--- a/checks/ibm_svc_portfc
+++ b/checks/ibm_svc_portfc
@@ -53,25 +53,29 @@
def inventory_ibm_svc_portfc(info):
for line in info:
- if len(line) in (11, 12, 14) and line[9] == "active":
- yield line[0], None
+ if len(line) in (11, 12) and line[9] == "active":
+ item = "Port %s" % line[0]
+ yield item, None
+ elif len(line) == 14 and line[9] == "active":
+ item = "Node %s Slot %s Port %s" % (line[5], line[12], line[13])
+ yield item, None
def check_ibm_svc_portfc(item, _no_params, info):
for line in info:
- if len(line) in (11, 12, 14):
- if line[0] == item:
- fc_port_status = line[9]
+ if ( len(line) in (11, 12) and "Port %s" % line[0] == item) or \
+ ( len(line) == 14 and "Node %s Slot %s Port %s" % (line[5], line[12], line[13]) ) == item:
+ infotext = "Status: %s, Speed: %s, WWPN: %s" % (line[9], line[4], line[7])
- if fc_port_status == "active":
- state = 0
- else:
- state = 2
+ if line[9] == "active":
+ state = 0
+ else:
+ state = 2
- return state, fc_port_status
+ return state, infotext
check_info["ibm_svc_portfc"] = {
"check_function" : check_ibm_svc_portfc,
"inventory_function" : inventory_ibm_svc_portfc,
- "service_description" : "FC Port %s",
+ "service_description" : "FC %s",
}
diff --git a/checks/ibm_svc_portsas b/checks/ibm_svc_portsas
index 276617c..01ee3af 100644
--- a/checks/ibm_svc_portsas
+++ b/checks/ibm_svc_portsas
@@ -25,10 +25,37 @@
# Boston, MA 02110-1301 USA.
+# Example agent output:
+# <<<ibm_svc_portsas:sep(58)>>>
+# 0:1:6Gb:1:node1:500507680305D3C0:online::host:host_controller:0:1
+# 1:2:6Gb:1:node1:500507680309D3C0:online::host:host_controller:0:2
+# 2:3:6Gb:1:node1:50050768030DD3C0:online::host:host_controller:0:3
+# 3:4:6Gb:1:node1:500507680311D3C0:offline:500507680474F03F:none:enclosure:0:4
+# 4:5:N/A:1:node1:500507680315D3C0:offline_unconfigured::none:host_controller:1:1
+# 5:6:N/A:1:node1:500507680319D3C0:offline_unconfigured::none:host_controller:1:2
+# 6:7:N/A:1:node1:50050768031DD3C0:offline_unconfigured::none:host_controller:1:3
+# 7:8:N/A:1:node1:500507680321D3C0:offline_unconfigured::none:host_controller:1:4
+# 8:1:6Gb:2:node2:500507680305D3C1:online::host:host_controller:0:1
+# 9:2:6Gb:2:node2:500507680309D3C1:online::host:host_controller:0:2
+# 10:3:6Gb:2:node2:50050768030DD3C1:online::host:host_controller:0:3
+# 11:4:6Gb:2:node2:500507680311D3C1:offline:500507680474F07F:none:enclosure:0:4
+# 12:5:N/A:2:node2:500507680315D3C1:offline_unconfigured::none:host_controller:1:1
+# 13:6:N/A:2:node2:500507680319D3C1:offline_unconfigured::none:host_controller:1:2
+# 14:7:N/A:2:node2:50050768031DD3C1:offline_unconfigured::none:host_controller:1:3
+# 15:8:N/A:2:node2:500507680321D3C1:offline_unconfigured::none:host_controller:1:4
+
+# the corresponding header line
+#id:port_id:port_speed:node_id:node_name:WWPN:status:switch_WWPN:attachment:type:adapter_location:adapter_port_id
+
def inventory_ibm_svc_portsas(info):
for line in info:
- if len(line) in (10, 12) and line[6] != "offline_unconfigured":
- yield line[0], {'current_state' : line[6]}
+ if line[6] != "offline_unconfigured":
+ if len(line) == 12:
+ item = "Node %s Slot %s Port %s" % (line[3], line[10], line[11])
+ yield item, {'current_state' : line[6]}
+ elif len(line) == 10:
+ item = "Port %s" % line[0]
+ yield item, {'current_state' : line[6]}
def check_ibm_svc_portsas(item, params, info):
# This can be removed soon, because the age of the check
@@ -36,7 +63,8 @@ def check_ibm_svc_portsas(item, params, info):
if not params:
params = { 'current_state' : 'offline' }
for line in info:
- if len(line) in (10, 12) and line[0] == item:
+ if ( len(line) == 12 and item == "Node %s Slot %s Port %s" % (line[3], line[10], line[11]) ) or \
+ ( len(line) == 10 and item == "Port %s" % line[0] ):
sasport_status = line[6]
sasport_speed = line[2]
sasport_type = line[9]
@@ -54,5 +82,5 @@ def check_ibm_svc_portsas(item, params, info):
check_info["ibm_svc_portsas"] = {
"check_function" : check_ibm_svc_portsas,
"inventory_function" : inventory_ibm_svc_portsas,
- "service_description" : "SAS Port %s",
+ "service_description" : "SAS %s",
}