added cache_flash, power
This commit is contained in:
parent
6b0bf10039
commit
d20dca6902
@ -0,0 +1,61 @@
|
||||
#!/usr/bin/python
|
||||
# -*- encoding: utf-8; py-indent-offset: 4 -*-
|
||||
# +------------------------------------------------------------------+
|
||||
# | ____ _ _ __ __ _ __ |
|
||||
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
|
||||
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
|
||||
# | | |___| | | | __/ (__| < | | | | . \ |
|
||||
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
|
||||
# | |
|
||||
# | Copyright Mathias Kettner 2020 mk@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-
|
||||
# tails. 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
|
||||
#<<<hitachivsp_channel_board:sep(9)>>>
|
||||
#location status type
|
||||
#CHB-1A Normal 32G Ready 4Port FC
|
||||
#CHB-1B Normal 32G Ready 4Port FC
|
||||
#CHB-2A Normal 32G Ready 4Port FC
|
||||
#CHB-2B Normal 32G Ready 4Port FC
|
||||
|
||||
|
||||
def inventory_hitachivsp_cache_flash_memories(info):
|
||||
for line in info:
|
||||
if "location" not in line:
|
||||
yield line[0], {}
|
||||
|
||||
|
||||
def check_hitachivsp_cache_flash_memories(item, params, info):
|
||||
for line in info:
|
||||
if item == line[0]:
|
||||
if line[1] == "Normal":
|
||||
yield 0, "Cache memory status is Normal"
|
||||
elif line[1] == "Warning":
|
||||
yield 1, "Cache memory status is Warning"
|
||||
elif line[1] == "Blocked":
|
||||
yield 2, "Cache memory status is Blocked"
|
||||
elif line[1] == "Blocked":
|
||||
yield 2, "Cache memory status is Failed"
|
||||
|
||||
|
||||
check_info['hitachivsp_cache_flash_memories'] = {
|
||||
'inventory_function': inventory_hitachivsp_cache_flash_memories,
|
||||
'check_function': check_hitachivsp_cache_flash_memories,
|
||||
'service_description': 'Cache Flash Memory %s',
|
||||
'has_perfdata': True
|
||||
}
|
||||
|
56
hitachi-vsp/share/check_mk/checks/hitachivsp_cache_memories
Normal file
56
hitachi-vsp/share/check_mk/checks/hitachivsp_cache_memories
Normal file
@ -0,0 +1,56 @@
|
||||
#!/usr/bin/python
|
||||
# -*- encoding: utf-8; py-indent-offset: 4 -*-
|
||||
# +------------------------------------------------------------------+
|
||||
# | ____ _ _ __ __ _ __ |
|
||||
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
|
||||
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
|
||||
# | | |___| | | | __/ (__| < | | | | . \ |
|
||||
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
|
||||
# | |
|
||||
# | Copyright Mathias Kettner 2020 mk@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-
|
||||
# tails. 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
|
||||
#<<<hitachivsp_cache_memories:sep(9)>>>
|
||||
#location status cacheSize
|
||||
#CTL1 CMG0 Normal 256
|
||||
#CTL1 CMG1 Normal 256
|
||||
#CTL2 CMG0 Normal 256
|
||||
#CTL2 CMG1 Normal 256
|
||||
|
||||
|
||||
def inventory_hitachivsp_cache_memories(info):
|
||||
for line in info:
|
||||
if "location" not in line:
|
||||
yield line[0], {}
|
||||
|
||||
|
||||
def check_hitachivsp_cache_memories(item, params, info):
|
||||
for line in info:
|
||||
if item == line[0]:
|
||||
if line[1] == "Normal":
|
||||
yield 0, "Cache memory status is Normal"
|
||||
elif line[1] == "Warning":
|
||||
yield 1, "Cache memory status is Warning"
|
||||
|
||||
check_info['hitachivsp_cache_memories'] = {
|
||||
'inventory_function': inventory_hitachivsp_cache_memories,
|
||||
'check_function': check_hitachivsp_cache_memories,
|
||||
'service_description': 'Cache Memory %s',
|
||||
'has_perfdata': True
|
||||
}
|
||||
|
65
hitachi-vsp/share/check_mk/checks/hitachivsp_channel_board
Normal file
65
hitachi-vsp/share/check_mk/checks/hitachivsp_channel_board
Normal file
@ -0,0 +1,65 @@
|
||||
#!/usr/bin/python
|
||||
# -*- encoding: utf-8; py-indent-offset: 4 -*-
|
||||
# +------------------------------------------------------------------+
|
||||
# | ____ _ _ __ __ _ __ |
|
||||
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
|
||||
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
|
||||
# | | |___| | | | __/ (__| < | | | | . \ |
|
||||
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
|
||||
# | |
|
||||
# | Copyright Mathias Kettner 2020 mk@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-
|
||||
# tails. 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
|
||||
<<<hitachivsp_channel_board:sep(9)>>>
|
||||
location status type
|
||||
CHB-1A Normal 32G Ready 4Port FC
|
||||
CHB-1B Normal 32G Ready 4Port FC
|
||||
CHB-2A Normal 32G Ready 4Port FC
|
||||
CHB-2B Normal 32G Ready 4Port FC
|
||||
|
||||
|
||||
def inventory_hitachivsp_channel_board(info):
|
||||
for line in info:
|
||||
if "location" not in line:
|
||||
yield line[0], {}
|
||||
|
||||
|
||||
def check_hitachivsp_channel_board(item, params, info):
|
||||
for line in info:
|
||||
if item == line[0]:
|
||||
if line[1] == "Normal":
|
||||
yield 0, "Channel board status is Normal, Channel board type: %s" %\
|
||||
line[2]
|
||||
elif line[1] == "Warning":
|
||||
yield 1, "Channel board status is Warning, Channel board type: %s" %\
|
||||
line[2]
|
||||
elif line[1] == "Blocked":
|
||||
yield 2, "Channel board status is Blocked, Channel board type: %s" %\
|
||||
line[2]
|
||||
elif line[1] == "Failed":
|
||||
yield 2, "Channel board status is Failed, Channel board type: %s" %\
|
||||
line[2]
|
||||
|
||||
|
||||
check_info['hitachivsp_channel_board'] = {
|
||||
'inventory_function': inventory_hitachivsp_channel_board,
|
||||
'check_function': check_hitachivsp_channel_board,
|
||||
'service_description': 'Channel Board %s',
|
||||
'has_perfdata': True
|
||||
}
|
||||
|
@ -52,3 +52,4 @@ check_info['hitachivsp_clprs'] = {
|
||||
'service_description': 'CLPR %s',
|
||||
'has_perfdata': True
|
||||
}
|
||||
|
||||
|
@ -26,9 +26,9 @@
|
||||
|
||||
#example output
|
||||
#<<<hitachivsp_ctls:sep(9)>>>
|
||||
#location status temperature temperatureStatus charge
|
||||
#CTL1 Normal 23 Normal 100
|
||||
#CTL2 Normal 23 Normal 100
|
||||
#location status temperature temperatureStatus charge
|
||||
#CTL1 Normal 23 Normal 100
|
||||
#CTL2 Normal 23 Normal 100
|
||||
|
||||
|
||||
def inventory_hitachivsp_ctls(info):
|
||||
@ -55,7 +55,7 @@ def check_hitachivsp_ctls(item, params, info):
|
||||
yield 1, "Temperature Status is Warning: %s" % line[2]
|
||||
elif line[3] == "Failed":
|
||||
yield 2, "Temperature Status is Failed: %s" % line[2]
|
||||
|
||||
|
||||
|
||||
check_info['hitachivsp_ctls'] = {
|
||||
'inventory_function': inventory_hitachivsp_ctls,
|
||||
@ -63,3 +63,4 @@ check_info['hitachivsp_ctls'] = {
|
||||
'service_description': '%s',
|
||||
'has_perfdata': True
|
||||
}
|
||||
|
||||
|
@ -24,12 +24,23 @@
|
||||
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
# Boston, MA 02110-1301 USA.
|
||||
|
||||
#.
|
||||
# .--general-------------------------------------------------------------.
|
||||
# | _ |
|
||||
# | __ _ ___ _ __ ___ _ __ __ _| | |
|
||||
# | / _` |/ _ \ '_ \ / _ \ '__/ _` | | |
|
||||
# | | (_| | __/ | | | __/ | | (_| | | |
|
||||
# | \__, |\___|_| |_|\___|_| \__,_|_| |
|
||||
# | |___/ |
|
||||
# +----------------------------------------------------------------------+
|
||||
# | |
|
||||
# '----------------------------------------------------------------------'
|
||||
|
||||
#example output
|
||||
#<<<hitachivsp_info:sep(9)>>>
|
||||
#666666 666666666666 88-04-03/00 VSP G700
|
||||
#666666 666666666666 88-04-03/00 VSP G700
|
||||
|
||||
def inventory_hitachivsp_info():
|
||||
def inventory_hitachivsp_info(info):
|
||||
return [(None, None)]
|
||||
|
||||
|
||||
@ -42,4 +53,4 @@ check_info['hitachivsp_info'] = {
|
||||
'inventory_function': inventory_hitachivsp_info,
|
||||
'check_function': check_hitachivsp_info,
|
||||
'service_description': 'Hitachi VSP Info',
|
||||
}
|
||||
}
|
||||
|
@ -23,15 +23,16 @@
|
||||
# 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
|
||||
#<<<hitachivsp_ldevs:sep(9)>>>
|
||||
#ldevId clprId byteFormatCapacity blockCapacity label status
|
||||
#0 0 500.00 G 1048576000 vg_test0 NML
|
||||
#1 0 400.00 G 838860800 vg_test1 NML
|
||||
#2 0 10.00 T 21474836480 vmware_legacy_ssd0 NML
|
||||
#3 0 10.00 T 21474836480 vmware_legacy_ssd1 NML
|
||||
#4 0 5.00 T 10737418240 vmware_legacy_ssd2 NML
|
||||
#5 0 5.00 T 10737418240 vmware_legacy_ssd3 NML
|
||||
#ldevId clprId byteFormatCapacity blockCapacity label status
|
||||
#0 0 500.00 G 1048576000 vg_test0 NML
|
||||
#1 0 400.00 G 838860800 vg_test1 NML
|
||||
#2 0 10.00 T 21474836480 vmware_legacy_ssd0 NML
|
||||
#3 0 10.00 T 21474836480 vmware_legacy_ssd1 NML
|
||||
#4 0 5.00 T 10737418240 vmware_legacy_ssd2 NML
|
||||
#5 0 5.00 T 10737418240 vmware_legacy_ssd3 NML
|
||||
|
||||
|
||||
def inventory_hitachivsp_ldevs(info):
|
||||
@ -45,7 +46,7 @@ def check_hitachivsp_ldevs(item, params, info):
|
||||
if item == line[0]:
|
||||
if line[5] == "NML":
|
||||
yield 0, "Ldev is in normal status; byteFormatCapacity: %s ; blockCapacity: %s ; label %s ; \
|
||||
status %s" % (line[2], line[3], line[4], line[5])
|
||||
status %s" % (line[2], line[3], line[4], line[5])
|
||||
elif line[5] == "BLK":
|
||||
yield 2, "Ldev is Blocked!!; byteFormatCapacity: %s ; blockCapacity: %s ; label %s ; \
|
||||
status %s" % (line[2], line[3], line[4], line[5])
|
||||
@ -60,4 +61,5 @@ check_info['hitachivsp_ldevs'] = {
|
||||
'check_function': check_hitachivsp_ldevs,
|
||||
'service_description': 'LDEV %s',
|
||||
'has_perfdata': False
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,13 +26,13 @@
|
||||
|
||||
#example output
|
||||
#<<<hitachivsp_parity_groups:sep(9)>>>
|
||||
#parityGroupId numOfLdevs usedCapacityRate clprId availableVolumeCapacity totalCapacity physicalCapacity
|
||||
#1-1 26 44 0 87245 157286 39321
|
||||
#1-2 51 93 0 10448 157286 39321
|
||||
#1-3 25 42 0 90317 157286 39321
|
||||
#1-4 52 95 0 7376 157286 39321
|
||||
#1-5 54 99 0 1232 157286 39321
|
||||
#1-6 25 42 0 90317 157286 39321
|
||||
#parityGroupId numOfLdevs usedCapacityRate clprId availableVolumeCapacity totalCapacity physicalCapacity
|
||||
#1-1 26 44 0 87245 157286 39321
|
||||
#1-2 51 93 0 10448 157286 39321
|
||||
#1-3 25 42 0 90317 157286 39321
|
||||
#1-4 52 95 0 7376 157286 39321
|
||||
#1-5 54 99 0 1232 157286 39321
|
||||
#1-6 25 42 0 90317 157286 39321
|
||||
|
||||
|
||||
def inventory_hitachivsp_parity_groups(info):
|
||||
@ -55,4 +55,5 @@ check_info['hitachivsp_parity_groups'] = {
|
||||
'check_function': check_hitachivsp_parity_groups,
|
||||
'service_description': 'Parity Group %s',
|
||||
'has_perfdata': True
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,9 +26,9 @@
|
||||
|
||||
#example output
|
||||
#<<<hitachivsp_pools:sep(9)>>>
|
||||
#poolID poolType poolName totalPhysicalCapacity totalPoolCapacity availableVolumeCapacity usedCapacityRate poolStatus
|
||||
#0 RT RAID6_HDT_01 397630296 397630296 208964826 47 POLN
|
||||
#1 HTI THIN_IMAGE_POOL 46453344 46453344 46453344 0 POLN
|
||||
#poolID poolType poolName totalPhysicalCapacity totalPoolCapacity availableVolumeCapacity usedCapacityRate poolStatus
|
||||
#0 RT RAID6_HDT_01 397630296 397630296 208964826 47 POLN
|
||||
#1 HTI THIN_IMAGE_POOL 46453344 46453344 46453344 0 POLN
|
||||
|
||||
|
||||
def inventory_hitachivsp_pools(info):
|
||||
@ -42,18 +42,19 @@ def check_hitachivsp_pools(item, _no_params, info):
|
||||
if item == line[0]:
|
||||
perf_data = line[6]
|
||||
if line[7] == "POLE":
|
||||
yield 2, "Pool is suspended in failure status"
|
||||
yield 2, "Pool is suspended in failure status"
|
||||
elif line[7] == "POLN":
|
||||
yield 0, "Pool is Normal"
|
||||
yield 0, "Pool is Normal"
|
||||
elif line[7] == "POLF":
|
||||
yield 2, "Pool is Full"
|
||||
yield 2, "Pool is Full"
|
||||
elif line[7] == "POLS":
|
||||
yield 2, "Pool is Suspended"
|
||||
|
||||
yield 2, "Pool is Suspended"
|
||||
|
||||
|
||||
|
||||
check_info['hitachivsp_pools'] = {
|
||||
'inventory_function': inventory_hitachivsp_pools,
|
||||
'check_function': check_hitachivsp_pools,
|
||||
'service_description': 'Pool %s',
|
||||
'has_perfdata': False
|
||||
}
|
||||
'has_perfdata': False
|
||||
}
|
||||
|
@ -35,8 +35,8 @@ def inventory_hitachivsp_powerConsumption(info):
|
||||
|
||||
|
||||
def check_hitachivsp_powerConsumption(item, params, info):
|
||||
yield 0, "Power Consumption: %s " % int(line[1]), \
|
||||
[("PowerConsumption", int(line[1]), None, None, 0)]
|
||||
yield 0, "Power Consumption: %s " % int(info[0][1]), \
|
||||
[("PowerConsumption", int(info[0][1]), None, None, 0)]
|
||||
|
||||
|
||||
check_info['hitachivsp_powerConsumption'] = {
|
||||
@ -45,3 +45,4 @@ check_info['hitachivsp_powerConsumption'] = {
|
||||
'service_description': '%s',
|
||||
'has_perfdata': True
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user