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',
|
'service_description': 'CLPR %s',
|
||||||
'has_perfdata': True
|
'has_perfdata': True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,3 +63,4 @@ check_info['hitachivsp_ctls'] = {
|
|||||||
'service_description': '%s',
|
'service_description': '%s',
|
||||||
'has_perfdata': True
|
'has_perfdata': True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,12 +24,23 @@
|
|||||||
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
# Boston, MA 02110-1301 USA.
|
# Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
#.
|
||||||
|
# .--general-------------------------------------------------------------.
|
||||||
|
# | _ |
|
||||||
|
# | __ _ ___ _ __ ___ _ __ __ _| | |
|
||||||
|
# | / _` |/ _ \ '_ \ / _ \ '__/ _` | | |
|
||||||
|
# | | (_| | __/ | | | __/ | | (_| | | |
|
||||||
|
# | \__, |\___|_| |_|\___|_| \__,_|_| |
|
||||||
|
# | |___/ |
|
||||||
|
# +----------------------------------------------------------------------+
|
||||||
|
# | |
|
||||||
|
# '----------------------------------------------------------------------'
|
||||||
|
|
||||||
#example output
|
#example output
|
||||||
#<<<hitachivsp_info:sep(9)>>>
|
#<<<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)]
|
return [(None, None)]
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
# License along with GNU Make; see the file COPYING. If not, write
|
# License along with GNU Make; see the file COPYING. If not, write
|
||||||
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
# Boston, MA 02110-1301 USA.
|
# Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
#example output
|
#example output
|
||||||
#<<<hitachivsp_ldevs:sep(9)>>>
|
#<<<hitachivsp_ldevs:sep(9)>>>
|
||||||
#ldevId clprId byteFormatCapacity blockCapacity label status
|
#ldevId clprId byteFormatCapacity blockCapacity label status
|
||||||
@ -61,3 +62,4 @@ check_info['hitachivsp_ldevs'] = {
|
|||||||
'service_description': 'LDEV %s',
|
'service_description': 'LDEV %s',
|
||||||
'has_perfdata': False
|
'has_perfdata': False
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,3 +56,4 @@ check_info['hitachivsp_parity_groups'] = {
|
|||||||
'service_description': 'Parity Group %s',
|
'service_description': 'Parity Group %s',
|
||||||
'has_perfdata': True
|
'has_perfdata': True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@ def check_hitachivsp_pools(item, _no_params, info):
|
|||||||
yield 2, "Pool is Suspended"
|
yield 2, "Pool is Suspended"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
check_info['hitachivsp_pools'] = {
|
check_info['hitachivsp_pools'] = {
|
||||||
'inventory_function': inventory_hitachivsp_pools,
|
'inventory_function': inventory_hitachivsp_pools,
|
||||||
'check_function': check_hitachivsp_pools,
|
'check_function': check_hitachivsp_pools,
|
||||||
|
@ -35,8 +35,8 @@ def inventory_hitachivsp_powerConsumption(info):
|
|||||||
|
|
||||||
|
|
||||||
def check_hitachivsp_powerConsumption(item, params, info):
|
def check_hitachivsp_powerConsumption(item, params, info):
|
||||||
yield 0, "Power Consumption: %s " % int(line[1]), \
|
yield 0, "Power Consumption: %s " % int(info[0][1]), \
|
||||||
[("PowerConsumption", int(line[1]), None, None, 0)]
|
[("PowerConsumption", int(info[0][1]), None, None, 0)]
|
||||||
|
|
||||||
|
|
||||||
check_info['hitachivsp_powerConsumption'] = {
|
check_info['hitachivsp_powerConsumption'] = {
|
||||||
@ -45,3 +45,4 @@ check_info['hitachivsp_powerConsumption'] = {
|
|||||||
'service_description': '%s',
|
'service_description': '%s',
|
||||||
'has_perfdata': True
|
'has_perfdata': True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user