5.02021-11-21T21:51:18ZTemplatesIBM-Storwize-3700 CLI v2IBM-Storwize-3700 CLI v2## Overview
Tested on Storwize 3700.
This script get next metrics:
Disk, Enclosure, Battery, Enclosure Canister, PSU, Mdisk, Pool, PortFibreChannel, PortSas, Volume
TemplatesBBU healthCanister healthDisk healthEnclosure healthFC healthInternalMdisk healthPoolPSU healthSAS healthVolume Health- Count of enclosureTRAPis_there_expansion_enclosure0POST
- get discoveryEXTERNALstorwize_get_state.py["--storwize_ip={HOST.IP}","--storwize_port={$STORWIZE_PORT}","--storwize_user={$STORWIZE_USER}","--storwize_password={$STORWIZE_PASSWORD}","--storage_name={HOST.NAME}","--discovery"]30mPOST
- get statusEXTERNALstorwize_get_state.py["--storwize_ip={HOST.IP}","--storwize_port={$STORWIZE_PORT}","--storwize_user={$STORWIZE_USER}","--storwize_password={$STORWIZE_PASSWORD}","--storage_name={HOST.NAME}","--status"]3mPOST{last()}=1000{HOST.NAME} -> Error connecting to storage deviceAVERAGE{last()}=1100{HOST.NAME} -> Error getting metrics from storage deviceAVERAGE{count(2h,2,eq)}>35{HOST.NAME} -> Error processing metrics on zabbixAVERAGEКол-во значений равных 2 и полученных за последний час больше или равно 35{count(2h,1,eq)}>35{HOST.NAME} -> Error sending metrics to zabbixAVERAGEКол-во значений равных 1 и полученных за последний час больше или равно 35{nodata(3600)}=1{HOST.NAME} -> No data from storage device for 1 hourAVERAGE
- Count of unsupported itemsINTERNALzabbix[host,,items_unsupported]10mInternal({last()}-1)>1{HOST.NAME} -> Exist unsupported itemsAVERAGE
DiskTRAPlsdrive01dHealth status of disk "{#SLOT_ID}" in enclosure "{#ENCLOSURE_ID}"TRAPhealth.lsdrive.[{#ENCLOSURE_ID}.{#SLOT_ID}]0online - which indicates that the drive is available through all drive ports
degraded - which indicates that the drive is available but not through all drive ports
offline - which indicates that the drive is unavailableDisk healthStorwize_HEALTH_STATUSPOST{last()}>0{HOST.NAME} -> Hard disk {#SLOT_ID} in enclosure {#ENCLOSURE_ID} health status is {ITEM.VALUE}HIGHPOSTEnclosureTRAPlsenclosure01dFault LED of enclosure ID - "{#ID}", Serial Number - "{#SERIAL_NUMBER}"TRAPfaultLED.lsenclosure.[{#ID}.{#SERIAL_NUMBER}]0Enclosure healthStorwize_HEALTH_STATUSPOST{last()}=8 or {last()}=10{HOST.NAME} -> Enclosure ID - "{#ID}", Serial Number - "{#SERIAL_NUMBER}" LED status is failedHIGHIndicates the status of the fault light-emitting diode (LED) on the enclosure:
on - if a service action is required immediately on the enclosure or a component within the enclosure (including a canister, power unit, or non-spared drive).
slow_flashing - if there is insufficient battery power to run I/O
off - if there are not faults on the enclosure or its componentsHealth status of enclosure ID - "{#ID}", Serial Number - "{#SERIAL_NUMBER}"TRAPhealth.lsenclosure.[{#ID}.{#SERIAL_NUMBER}]0Enclosure healthStorwize_HEALTH_STATUSPOST{last()}>0{HOST.NAME} -> Enclosure ID - "{#ID}", Serial Number - "{#SERIAL_NUMBER}" health status is {ITEM.VALUE}HIGHPOSTEnclosure BatteryTRAPlsenclosurebattery01dHealth status of BBU "{#BATTERY_ID}" in enclosure "{#ENCLOSURE_ID}"TRAPhealth.lsenclosurebattery.[{#ENCLOSURE_ID}.{#BATTERY_ID}]0BBU healthStorwize_HEALTH_STATUSPOST{last()}>0{HOST.NAME} -> BBU "{#BATTERY_ID}" in enclosure "{#ENCLOSURE_ID}" health status is {ITEM.VALUE}HIGHPOSTEnclosure CanisterTRAPlsenclosurecanister01dNode Canister
Контроллер, головаHealth status of Canister "{#CANISTER_ID}" in enclosure "{#ENCLOSURE_ID}"TRAPhealth.lsenclosurecanister.[{#ENCLOSURE_ID}.{#CANISTER_ID}]0Canister healthStorwize_HEALTH_STATUSPOST{last()}>0{HOST.NAME} -> Canister "{#CANISTER_ID}" in enclosure "{#ENCLOSURE_ID}" health status is {ITEM.VALUE}HIGHPOSTEnclosure PSUTRAPlsenclosurepsu01dFan of PSU "{#PSU_ID}" in enclosure "{#ENCLOSURE_ID}"TRAPfanFailed.lsenclosurepsu.[{#ENCLOSURE_ID}.{#PSU_ID}]0PSU healthStorwize_HEALTH_STATUSPOST{last()}=8{HOST.NAME} -> PSU "{#PSU_ID}" in enclosure "{#ENCLOSURE_ID}" fan status is failedHIGHHealth status of PSU "{#PSU_ID}" in enclosure "{#ENCLOSURE_ID}"TRAPhealth.lsenclosurepsu.[{#ENCLOSURE_ID}.{#PSU_ID}]0PSU healthStorwize_HEALTH_STATUSPOST{last()}>0{HOST.NAME} -> PSU "{#PSU_ID}" in enclosure "{#ENCLOSURE_ID}" health status is {ITEM.VALUE}HIGHInput Power of PSU "{#PSU_ID}" in enclosure "{#ENCLOSURE_ID}"TRAPinFailed.lsenclosurepsu.[{#ENCLOSURE_ID}.{#PSU_ID}]0PSU healthStorwize_HEALTH_STATUSPOST{last()}=8{HOST.NAME} -> PSU "{#PSU_ID}" in enclosure "{#ENCLOSURE_ID}" input power status is failedHIGHOutput Power of PSU "{#PSU_ID}" in enclosure "{#ENCLOSURE_ID}"TRAPoutFailed.lsenclosurepsu.[{#ENCLOSURE_ID}.{#PSU_ID}]0PSU healthStorwize_HEALTH_STATUSPOST{last()}=8{HOST.NAME} -> PSU "{#PSU_ID}" in enclosure "{#ENCLOSURE_ID}" output power status is failedHIGHPOSTMdiskTRAPlsmdisk01dDisplay a concise list or a detailed view of managed disks (MDisks).
RAID-массивы показываетHealth status of Mdisk "{#NAME}"TRAPhealth.lsmdisk.[{#NAME}]0Mdisk healthStorwize_HEALTH_STATUSPOST{last()}>0{HOST.NAME} -> Mdisk "{#NAME}" health status is {ITEM.VALUE}HIGHPOSTPoolTRAPlsmdiskgrp01dFree capacity of a Pool "{#NAME}"TRAPfree.lsmdiskgrp.[{#NAME}]00BPoolPOSTHealth status of a Pool "{#NAME}"TRAPhealth.lsmdiskgrp.[{#NAME}]0PoolStorwize_HEALTH_STATUSPOST{last()}>0{HOST.NAME} -> Pool "{#NAME}" health status is {ITEM.VALUE}HIGHPercent overallocation on Pool "{#NAME}"TRAPoverallocation.lsmdiskgrp.[{#NAME}]0%PoolPOST{last()}>{$SUBSCRIBED_PERCENT:"{#NAME}"}{HOST.NAME} -> Subscribed capacity on pool "{#NAME}" > {$SUBSCRIBED_PERCENT:"{#NAME}"}%HIGHReal capacity of a Pool "{#NAME}"TRAPreal.lsmdiskgrp.[{#NAME}]00BPoolPOSTTotal capacity of a Pool "{#NAME}"TRAPtotal.lsmdiskgrp.[{#NAME}]00BPoolPOSTUsed capacity of a Pool "{#NAME}"TRAPused.lsmdiskgrp.[{#NAME}]00BPoolPOSTVirtual capacity of a Pool "{#NAME}"TRAPvirtual.lsmdiskgrp.[{#NAME}]00BPoolPOSTPOSTPortFibreChannelTRAPlsportfc01dRunning status of Fibre Channel port ID - "{#PORT_ID}", node name - "{#NODE_NAME}"TRAPrunning.lsportfc.[{#PORT_ID}.{#NODE_NAME}]0FC healthStorwize_HEALTH_STATUSPOST{last()}=4{HOST.NAME} - > PortFibreChannel ID - "{#PORT_ID}", node name - "{#NODE_NAME}" running status is {ITEM.VALUE}HIGHIndicates whether the port is configured to a device of Fibre Channel (FC) port. The values are:
active
inactive_configured
inactive_unconfiguredPOSTPortSASTRAPlsportsas01dRunning status of SAS port ID - "{#PORT_ID}", node name - "{#NODE_NAME}"TRAPrunning.lsportsas.[{#PORT_ID}.{#NODE_NAME}]0SAS healthStorwize_HEALTH_STATUSPOST({TRIGGER.VALUE}=0 and {IBM-Storwize-3700 CLI v2:running.lsportsas.[{#PORT_ID}.{#NODE_NAME}].last()}<>0 and {IBM-Storwize-3700 CLI v2:running.lsportsas.[{#PORT_ID}.{#NODE_NAME}].change()}=1) or ({TRIGGER.VALUE}=1 and {IBM-Storwize-3700 CLI v2:is_there_expansion_enclosure.last()}<>0){HOST.NAME} -> PortSas ID - "{#PORT_ID}", node name - "{#NODE_NAME}" running status is {ITEM.VALUE}HIGHIndicates the status of the port (numeric string). The values can be:
online - if the port is functioning
offline - if the port is not functioning
offline_unconfigured - if not functioning but not configured by the user
degraded - if one or more ports are not functioning or have a lower speed than others
excluded - if excluded by the user or system
Если на сторвайзе нет полок-расширения, то SAS-порты на контроллере будут оффлайнPOSTVolumeTRAPlsvdisk01dHealth status of Volume "{#NAME}"TRAPhealth.lsvdisk.[{#NAME}]0Volume HealthStorwize_HEALTH_STATUSPOST{last()}>0{HOST.NAME} -> Volume "{#NAME}" health status is {ITEM.VALUE}HIGHPOST{$STORWIZE_PASSWORD}{$STORWIZE_PORT}22{$STORWIZE_USER}{$SUBSCRIBED_PERCENT}91Storwize_HEALTH_STATUS0ONLINE1OFFLINE2Degraded3Active4Inactive_Configured5Inactive_Unconfigured6Offline_unconfigured7Excluded8on9off10slow_flashing11degraded_paths12degraded_ports100Unknown