Update Hitachi VSP plugin for CheckMK 2.3+.
This commit is contained in:
parent
977fecdda0
commit
d82a602c8d
@ -0,0 +1,96 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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_backup_modules:sep(9)>>>
|
||||||
|
#location status bat_location bat_status bat_life
|
||||||
|
#BKMF-10 Normal
|
||||||
|
#BKMF-11 Normal BAT-B11 Normal 90
|
||||||
|
#BKMF-12 Normal BAT-B12 Normal 90
|
||||||
|
#BKMF-13 Normal BAT-B13 Normal 90
|
||||||
|
#BKMF-20 Normal
|
||||||
|
#BKMF-21 Normal BAT-B21 Normal 90
|
||||||
|
#BKMF-22 Normal BAT-B22 Normal 90
|
||||||
|
#BKMF-23 Normal BAT-B23 Normal 90
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin, Metric
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_backup_modules(section):
|
||||||
|
for line in section:
|
||||||
|
if "location" not in line:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_backup_modules(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
status = line[1]
|
||||||
|
|
||||||
|
if status == "Normal":
|
||||||
|
state = State.OK
|
||||||
|
summary = "Backup Module status is Normal"
|
||||||
|
elif status == "Warning":
|
||||||
|
state = State.WARN
|
||||||
|
summary = "Backup Module status is Warning"
|
||||||
|
elif status == "Blocked":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = "Backup Module status is Blocked"
|
||||||
|
elif status == "Failed":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = "Backup Module status is Failed"
|
||||||
|
|
||||||
|
yield Result(state=state, summary=summary)
|
||||||
|
|
||||||
|
if len(line) > 2:
|
||||||
|
battery_status, battery_percent = line[3:5]
|
||||||
|
|
||||||
|
yield Metric(name="battery_percent", value=int(battery_percent))
|
||||||
|
|
||||||
|
if battery_status == "Normal":
|
||||||
|
b_state = State.OK
|
||||||
|
b_summary = "Battery status is Normal"
|
||||||
|
elif battery_status == "Warning":
|
||||||
|
b_state = State.WARN
|
||||||
|
b_summary = "Battery status is Warning"
|
||||||
|
elif battery_status == "Blocked":
|
||||||
|
b_state = State.CRIT
|
||||||
|
b_summary = "Battery status is Blocked"
|
||||||
|
elif battery_status == "Failed":
|
||||||
|
b_state = State.CRIT
|
||||||
|
b_summary = "Battery status is Failed"
|
||||||
|
|
||||||
|
yield Result(state=b_state, summary=b_summary)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_backup_modules = CheckPlugin(
|
||||||
|
name="hitachivsp_backup_modules",
|
||||||
|
service_name="Backup Module %s",
|
||||||
|
discovery_function=discover_hitachivsp_backup_modules,
|
||||||
|
check_function=check_hitachivsp_backup_modules,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,72 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_cache_flash_memories(section):
|
||||||
|
for line in section:
|
||||||
|
if "location" not in line:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_cache_flash_memories(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
status = line[1]
|
||||||
|
|
||||||
|
if status == "Normal":
|
||||||
|
state = State.OK
|
||||||
|
summary = "Cache memory status is Normal"
|
||||||
|
if status == "Warning":
|
||||||
|
state = State.WARN
|
||||||
|
summary = "Cache memory status is Warning"
|
||||||
|
elif status == "Blocked":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = "Cache memory status is Blocked"
|
||||||
|
elif status == "Failed":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = "Cache memory status is Failed"
|
||||||
|
|
||||||
|
yield Result(state=state, summary=summary)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_cache_flash_memories = CheckPlugin(
|
||||||
|
name="hitachivsp_cache_flash_memories",
|
||||||
|
service_name="Cache Flash Memory %s",
|
||||||
|
discovery_function=discover_hitachivsp_cache_flash_memories,
|
||||||
|
check_function=check_hitachivsp_cache_flash_memories,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,68 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin, Metric
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_cache_memories(section):
|
||||||
|
for line in section:
|
||||||
|
if "location" not in line:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_cache_memories(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
status, cache_size = line[1:3]
|
||||||
|
|
||||||
|
yield Metric(name="cache_size", value=int(cache_size))
|
||||||
|
|
||||||
|
if status == "Normal":
|
||||||
|
state = State.OK
|
||||||
|
summary = "Cache memory status is Normal"
|
||||||
|
elif status == "Warning":
|
||||||
|
state = State.WARN
|
||||||
|
summary = "Cache memory status is Warning"
|
||||||
|
|
||||||
|
yield Result(state=state, summary=summary)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_cache_memories = CheckPlugin(
|
||||||
|
name="hitachivsp_cache_memories",
|
||||||
|
service_name="Cache Memory %s",
|
||||||
|
discovery_function=discover_hitachivsp_cache_memories,
|
||||||
|
check_function=check_hitachivsp_cache_memories,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,72 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin, Metric
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_channel_board(section):
|
||||||
|
for line in section:
|
||||||
|
if "location" not in line:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_channel_board(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
status, type = line[1:3]
|
||||||
|
|
||||||
|
if status == "Normal":
|
||||||
|
state = State.OK
|
||||||
|
summary = f"Channel board status is Normal, Channel board type: {type}"
|
||||||
|
elif status == "Warning":
|
||||||
|
state = State.WARN
|
||||||
|
summary = f"Channel board status is Warning, Channel board type: {type}"
|
||||||
|
elif status == "Blocked":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = f"Channel board status is Blocked, Channel board type: {type}"
|
||||||
|
elif status == "Failed":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = f"Channel board status is Failed, Channel board type: {type}"
|
||||||
|
|
||||||
|
yield Result(state=state, summary=summary)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_channel_board = CheckPlugin(
|
||||||
|
name="hitachivsp_channel_board",
|
||||||
|
service_name="Channel Board %s",
|
||||||
|
discovery_function=discover_hitachivsp_channel_board,
|
||||||
|
check_function=check_hitachivsp_channel_board,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,64 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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_clprs:sep(9)>>>
|
||||||
|
#clprId cacheMemoryCapacity cacheMemoryUsedCapacity writePendingDataCapacity cacheUsageRate
|
||||||
|
#0 924672 901454 44959 99
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin, Metric
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_clprs(section):
|
||||||
|
for line in section:
|
||||||
|
if "clprId" not in line:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_clprs(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
total, used, pending, rate = line[1:5]
|
||||||
|
|
||||||
|
yield Metric(name="CacheMemoryCapacity", value=int(total))
|
||||||
|
yield Metric(name="CacheMemoryUsedCapacity", value=int(used))
|
||||||
|
yield Metric(name="WritePendingDataCapacity", value=int(pending))
|
||||||
|
yield Metric(name="CacheUsageRate", value=int(rate))
|
||||||
|
|
||||||
|
yield Result(
|
||||||
|
state=State.OK,
|
||||||
|
summary=f"CacheMemoryCapacity[GB]: {int(total)/1024} ; CacheMemoryUsedCapacity[GB]: {int(used)/1024} ; cacheUsageRate {rate}",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_clprs = CheckPlugin(
|
||||||
|
name="hitachivsp_clprs",
|
||||||
|
service_name="CLPR %s",
|
||||||
|
discovery_function=discover_hitachivsp_clprs,
|
||||||
|
check_function=check_hitachivsp_clprs,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,85 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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_ctls:sep(9)>>>
|
||||||
|
#location status temperature temperatureStatus charge
|
||||||
|
#CTL1 Normal 23 Normal 100
|
||||||
|
#CTL2 Normal 23 Normal 100
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin, Metric
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_ctls(section):
|
||||||
|
for line in section:
|
||||||
|
if "location" not in line:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_ctls(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
status, temperature, temperature_status, charge = line[1:5]
|
||||||
|
|
||||||
|
yield Metric("temperature", int(temperature))
|
||||||
|
yield Metric("charge", int(charge))
|
||||||
|
|
||||||
|
if status == "Normal":
|
||||||
|
state = State.OK
|
||||||
|
summary = "Controller status is Normal"
|
||||||
|
elif status == "Warning":
|
||||||
|
state = State.WARN
|
||||||
|
summary = "Controller status is Warning"
|
||||||
|
elif status == "Blocked":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = "Controller status is Blocked"
|
||||||
|
elif status == "Failed":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = "Controller status is Failed"
|
||||||
|
|
||||||
|
yield Result(state=state, summary=summary)
|
||||||
|
|
||||||
|
if temperature_status == "Normal":
|
||||||
|
t_state = State.OK
|
||||||
|
t_summary = f"Temperature Status is Normal: {temperature}"
|
||||||
|
if temperature_status == "Warning":
|
||||||
|
t_state = State.WARN
|
||||||
|
t_summary = f"Temperature Status is Warning: {temperature}"
|
||||||
|
elif temperature_status == "Failed":
|
||||||
|
t_state = State.CRIT
|
||||||
|
t_summary = f"Temperature Status is Failed: %{temperature}"
|
||||||
|
|
||||||
|
yield Result(state=t_state, summary=t_summary)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_ctls = CheckPlugin(
|
||||||
|
name="hitachivsp_ctls",
|
||||||
|
service_name="CTLS %s",
|
||||||
|
discovery_function=discover_hitachivsp_ctls,
|
||||||
|
check_function=check_hitachivsp_ctls,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,72 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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_disk_boards:sep(9)>>>
|
||||||
|
#location status type
|
||||||
|
#DKB-1G Normal Disk Board
|
||||||
|
#DKB-1H Normal Disk Board
|
||||||
|
#DKB-2G Normal Disk Board
|
||||||
|
#DKB-2H Normal Disk Board
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_disk_boards(section):
|
||||||
|
for line in section:
|
||||||
|
if "location" not in line:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_disk_boards(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
status = line[1]
|
||||||
|
|
||||||
|
if status == "Normal":
|
||||||
|
state = State.OK
|
||||||
|
summary = "Disk Board status is Normal"
|
||||||
|
elif status == "Warning":
|
||||||
|
state = State.WARN
|
||||||
|
summary = "Disk Board status is Warning"
|
||||||
|
elif status == "Blocked":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = "Disk Board status is Blocked"
|
||||||
|
elif status == "Failed":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = "Disk Board status is Failed"
|
||||||
|
|
||||||
|
yield Result(state=state, summary=summary)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_disk_boards = CheckPlugin(
|
||||||
|
name="hitachivsp_disk_boards",
|
||||||
|
service_name="Disk Board %s",
|
||||||
|
discovery_function=discover_hitachivsp_disk_boards,
|
||||||
|
check_function=check_hitachivsp_disk_boards,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,73 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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_drive_boxes_dbps:sep(9)>>>
|
||||||
|
#drivebox_location dbps_location dbps_status
|
||||||
|
#DB-00 DBPS00-1 Normal
|
||||||
|
#DB-00 DBPS00-2 Normal
|
||||||
|
#DB-01 DBPS01-1 Normal
|
||||||
|
#DB-01 DBPS01-2 Normal
|
||||||
|
#DB-02 DBPS02-1 Normal
|
||||||
|
#DB-02 DBPS02-2 Normal
|
||||||
|
#DB-03 DBPS03-1 Normal
|
||||||
|
#DB-03 DBPS03-2 Normal
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_drive_boxes_dbps(section):
|
||||||
|
for line in section:
|
||||||
|
if "drivebox_location" not in line:
|
||||||
|
yield Service(item=line[1])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_drive_boxes_dbps(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[1]:
|
||||||
|
status = line[2]
|
||||||
|
|
||||||
|
if status == "Normal":
|
||||||
|
state = State.OK
|
||||||
|
summary = "DriveBox Power Supply status is Normal"
|
||||||
|
elif status == "Warning":
|
||||||
|
state = State.WARN
|
||||||
|
summary = "DriveBox Power Supply status is Warning"
|
||||||
|
elif status == "Failed":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = "DriveBox Power Supply status is Failed"
|
||||||
|
|
||||||
|
yield Result(state=state, summary=summary)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_drive_boxes_dbps = CheckPlugin(
|
||||||
|
name="hitachivsp_drive_boxes_dbps",
|
||||||
|
service_name="DriveBox Power Supply %s",
|
||||||
|
discovery_function=discover_hitachivsp_drive_boxes_dbps,
|
||||||
|
check_function=check_hitachivsp_drive_boxes_dbps,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,99 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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_drive_boxes_drives:sep(9)>>>
|
||||||
|
#drivebox_location drive_location drive_status drive_recomend_Replacement
|
||||||
|
#DB-00 HDD00-00 Normal 0
|
||||||
|
#DB-00 HDD00-01 Normal 0
|
||||||
|
#DB-00 HDD00-02 Normal 0
|
||||||
|
#DB-00 HDD00-03 Normal 0
|
||||||
|
#DB-00 HDD00-04 Normal 0
|
||||||
|
#DB-00 HDD00-05 Normal 0
|
||||||
|
#DB-00 HDD00-11 Normal 0
|
||||||
|
#DB-01 HDD01-00 Normal 0
|
||||||
|
#DB-01 HDD01-01 Normal 0
|
||||||
|
#DB-01 HDD01-02 Normal 0
|
||||||
|
#DB-01 HDD01-03 Normal 0
|
||||||
|
#DB-01 HDD01-04 Normal 0
|
||||||
|
#DB-01 HDD01-05 Normal 0
|
||||||
|
#DB-02 HDD02-00 Normal 0
|
||||||
|
#DB-02 HDD02-01 Normal 0
|
||||||
|
#DB-02 HDD02-02 Normal 0
|
||||||
|
#DB-02 HDD02-03 Normal 0
|
||||||
|
#DB-02 HDD02-04 Normal 0
|
||||||
|
#DB-02 HDD02-05 Normal 0
|
||||||
|
#DB-03 HDD03-00 Normal 0
|
||||||
|
#DB-03 HDD03-01 Normal 0
|
||||||
|
#DB-03 HDD03-02 Normal 0
|
||||||
|
#DB-03 HDD03-03 Normal 0
|
||||||
|
#DB-03 HDD03-04 Normal 0
|
||||||
|
#DB-03 HDD03-05 Normal 0
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_drive_boxes_drives(section):
|
||||||
|
for line in section:
|
||||||
|
if "drivebox_location" not in line:
|
||||||
|
yield Service(item=line[1])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_drive_boxes_drives(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[1]:
|
||||||
|
status, replace = line[2:4]
|
||||||
|
|
||||||
|
if status == "Normal":
|
||||||
|
state = State.OK
|
||||||
|
summary = "Drive status is Normal"
|
||||||
|
elif ("Warning" in status) or ("Copying" in status) or ("Pending" in status):
|
||||||
|
state = State.WARN
|
||||||
|
summary = f"Drive status is: {state}"
|
||||||
|
elif status == "Copy incomplete":
|
||||||
|
state = State.CRIT
|
||||||
|
status = "Drive status is Copy Incomplete"
|
||||||
|
|
||||||
|
yield Result(state=state, summary=summary)
|
||||||
|
|
||||||
|
if replace == "0":
|
||||||
|
r_state = State.OK
|
||||||
|
r_summary = "Drive replacement is not recommended"
|
||||||
|
elif replace == "1":
|
||||||
|
r_state = State.WARN
|
||||||
|
r_summary = "Drive replacement is recommended"
|
||||||
|
|
||||||
|
yield Result(state=r_state, summary=r_summary)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_drive_boxes_drives = CheckPlugin(
|
||||||
|
name="hitachivsp_drive_boxes_drives",
|
||||||
|
service_name="Drive %s",
|
||||||
|
discovery_function=discover_hitachivsp_drive_boxes_drives,
|
||||||
|
check_function=check_hitachivsp_drive_boxes_drives,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,76 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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_drive_boxes_encs:sep(9)>>>
|
||||||
|
#drivebox_location enc_location enc_status
|
||||||
|
#DB-00 ENC00-1 Normal
|
||||||
|
#DB-00 ENC00-2 Normal
|
||||||
|
#DB-01 ENC01-1 Normal
|
||||||
|
#DB-01 ENC01-2 Normal
|
||||||
|
#DB-02 ENC02-1 Normal
|
||||||
|
#DB-02 ENC02-2 Normal
|
||||||
|
#DB-03 ENC03-1 Normal
|
||||||
|
#DB-03 ENC03-2 Normal
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_drive_boxes_encs(section):
|
||||||
|
for line in section:
|
||||||
|
if "drivebox_location" not in line:
|
||||||
|
yield Service(item=line[1])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_drive_boxes_encs(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[1]:
|
||||||
|
status = line[2]
|
||||||
|
|
||||||
|
if status == "Normal":
|
||||||
|
state = State.OK
|
||||||
|
summary = "Drive Enclosure status is Normal"
|
||||||
|
elif status == "Warning":
|
||||||
|
state = State.WARN
|
||||||
|
summary = "Drive Enclosure status is Warning"
|
||||||
|
elif status == "Blocked":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = "Drive Enclosure status is Blocked"
|
||||||
|
elif status == "Failed":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = "Drive Enclosure status is Failed"
|
||||||
|
|
||||||
|
yield Result(state=state, summary=summary)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_drive_boxes_encs = CheckPlugin(
|
||||||
|
name="hitachivsp_drive_boxes_encs",
|
||||||
|
service_name="Drive box enclosure %s",
|
||||||
|
discovery_function=discover_hitachivsp_drive_boxes_encs,
|
||||||
|
check_function=check_hitachivsp_drive_boxes_encs,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,67 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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.
|
||||||
|
|
||||||
|
#.
|
||||||
|
# .--general-------------------------------------------------------------.
|
||||||
|
# | _ |
|
||||||
|
# | __ _ ___ _ __ ___ _ __ __ _| | |
|
||||||
|
# | / _` |/ _ \ '_ \ / _ \ '__/ _` | | |
|
||||||
|
# | | (_| | __/ | | | __/ | | (_| | | |
|
||||||
|
# | \__, |\___|_| |_|\___|_| \__,_|_| |
|
||||||
|
# | |___/ |
|
||||||
|
# +----------------------------------------------------------------------+
|
||||||
|
# | |
|
||||||
|
# '----------------------------------------------------------------------'
|
||||||
|
|
||||||
|
#example output
|
||||||
|
#<<<hitachivsp_info:sep(9)>>>
|
||||||
|
#666666 666666666666 88-04-03/00 VSP G700
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_info(section):
|
||||||
|
for line in section:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_info(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
yield Result(
|
||||||
|
state=State.OK,
|
||||||
|
summary=f"Model: {line[3]}, Serial Number: {line[0]}, StorageDeviceID: {line[1]}, dkcMicroVersion: {line[2]}"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_info = CheckPlugin(
|
||||||
|
name="hitachivsp_info",
|
||||||
|
service_name="Hitachi VSP Info %s",
|
||||||
|
discovery_function=discover_hitachivsp_info,
|
||||||
|
check_function=check_hitachivsp_info,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,76 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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_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
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin, Metric
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_ldevs(section):
|
||||||
|
for line in section:
|
||||||
|
if "ldevId" not in line:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_ldevs(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
byte_cap, blk_cap, label, status = line[2:6]
|
||||||
|
|
||||||
|
yield Metric("BlockCapacity", int(blk_cap))
|
||||||
|
|
||||||
|
if status == "NML":
|
||||||
|
state = State.OK
|
||||||
|
summary = f"Ldev is in normal status; byteFormatCapacity: {byte_cap}; blockCapacity: {blk_cap}; label {label}; status {status}"
|
||||||
|
elif status == "BLK":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = f"Ldev is Blocked!; byteFormatCapacity: {byte_cap}; blockCapacity: {blk_cap}; label {label}; status {status}"
|
||||||
|
elif status == "BSY":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = f"Ldev status is being changed!; byteFormatCapacity: {byte_cap}; blockCapacity: {blk_cap}; label {label}; status {status}"
|
||||||
|
else:
|
||||||
|
state = State.UNKNOWN
|
||||||
|
summary = "Ldev status is unknown (not supported)"
|
||||||
|
|
||||||
|
yield Result(state=state, summary=summary)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_ldevs = CheckPlugin(
|
||||||
|
name="hitachivsp_ldevs",
|
||||||
|
service_name="LDEV %s",
|
||||||
|
discovery_function=discover_hitachivsp_ldevs,
|
||||||
|
check_function=check_hitachivsp_ldevs,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,68 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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_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
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin, Metric
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_parity_groups(section):
|
||||||
|
for line in section:
|
||||||
|
if "parityGroupId" not in line:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_parity_groups(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
rate, _, avail, total = line[2:6]
|
||||||
|
|
||||||
|
yield Metric(name="UsedCapacityRate", value=int(rate))
|
||||||
|
yield Metric(name="AvailableVolumeCapacity", value=int(avail))
|
||||||
|
yield Metric(name="TotalCapacity", value=int(total))
|
||||||
|
|
||||||
|
yield Result(
|
||||||
|
state=State.OK,
|
||||||
|
summary=f"UsedCapacityRate: {rate}; AvailableVolumeCapacity(GB): {avail}; TotalCapacity(GB): {total}"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_parity_groups = CheckPlugin(
|
||||||
|
name="hitachivsp_parity_groups",
|
||||||
|
service_name="Parity Group %s",
|
||||||
|
discovery_function=discover_hitachivsp_parity_groups,
|
||||||
|
check_function=check_hitachivsp_parity_groups,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,75 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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_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
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin, Metric
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_pools(section):
|
||||||
|
for line in section:
|
||||||
|
if "poolID" not in line:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_pools(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
name, phys_cap, pool_cap, avail, rate, status = line[2:8]
|
||||||
|
|
||||||
|
yield Metric(name="TotalPhysicalCapacity", value=int(phys_cap))
|
||||||
|
yield Metric(name="TotalPoolCapacity", value=int(pool_cap))
|
||||||
|
yield Metric(name="AvailableVolumeCapacity", value=int(avail))
|
||||||
|
yield Metric(name="UsedCapacityRate", value=int(rate))
|
||||||
|
|
||||||
|
if status == "POLN":
|
||||||
|
state = State.OK
|
||||||
|
summary = f"Pool {name} is Normal"
|
||||||
|
elif status == "POLE":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = f"Pool {name} is suspended in failure status"
|
||||||
|
elif status == "POLF":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = f"Pool {name} is Full"
|
||||||
|
elif status == "POLS":
|
||||||
|
state = State.CRIT
|
||||||
|
summary = f"Pool {name} is Suspended"
|
||||||
|
|
||||||
|
yield Result(state=state, summary=summary)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_pools = CheckPlugin(
|
||||||
|
name="hitachivsp_pools",
|
||||||
|
service_name="Pool %s",
|
||||||
|
discovery_function=discover_hitachivsp_pools,
|
||||||
|
check_function=check_hitachivsp_pools,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,54 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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_power_consumption:sep(9)>>>
|
||||||
|
#power_consumption 1357
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin, Metric
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_power_consumption(section):
|
||||||
|
for line in section:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_power_consumption(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
power = line[1]
|
||||||
|
yield Metric(name="Power", value=int(power))
|
||||||
|
yield Result(state=State.OK, summary=f"Power {power}")
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_power_consumption = CheckPlugin(
|
||||||
|
name="hitachivsp_power_consumption",
|
||||||
|
service_name="PowerConsumption %s",
|
||||||
|
discovery_function=discover_hitachivsp_power_consumption,
|
||||||
|
check_function=check_hitachivsp_power_consumption,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
@ -0,0 +1,94 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- 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_sfps:sep(9)>>>
|
||||||
|
#portId status type speed portCondition
|
||||||
|
#1A Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#3A Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#5A Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#7A Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#1B Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#3B Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#5B Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#7B Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#2A Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#4A Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#6A Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#8A Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#2B Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#4B Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#6B Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
#8B Normal Short Wave 16 Gbps Available (Connected)
|
||||||
|
|
||||||
|
|
||||||
|
from cmk.agent_based.v2 import Service, Result, State, CheckPlugin
|
||||||
|
|
||||||
|
|
||||||
|
def discover_hitachivsp_sfps(section):
|
||||||
|
for line in section:
|
||||||
|
if "portId" not in line:
|
||||||
|
yield Service(item=line[0])
|
||||||
|
|
||||||
|
|
||||||
|
def check_hitachivsp_sfps(item, params, section):
|
||||||
|
for line in section:
|
||||||
|
if item == line[0]:
|
||||||
|
status = line[1]
|
||||||
|
port_condition = line[4]
|
||||||
|
|
||||||
|
if status == "Normal":
|
||||||
|
state = State.OK
|
||||||
|
summary = "SFP status is Normal"
|
||||||
|
elif status == "Warning":
|
||||||
|
state = State.WARN
|
||||||
|
summary = "SFP status is Warning"
|
||||||
|
elif status == "Not fix":
|
||||||
|
state = State.CRIT
|
||||||
|
summary ="SFP status is Not fix"
|
||||||
|
|
||||||
|
yield Result(state=state, summary=summary)
|
||||||
|
|
||||||
|
if port_condition == "Available (Connected)":
|
||||||
|
p_state = State.OK
|
||||||
|
p_summary = "SFP is Connected"
|
||||||
|
elif port_condition == "Available (Not Connected)":
|
||||||
|
p_state = State.WARN
|
||||||
|
p_summary = "SFP is not Connected"
|
||||||
|
elif port_condition == "Not Available":
|
||||||
|
p_state = State.CRIT
|
||||||
|
p_summary = "SFP is not available"
|
||||||
|
|
||||||
|
yield Result(state=p_state, summary=p_summary)
|
||||||
|
|
||||||
|
|
||||||
|
check_plugin_hitachivsp_sfps = CheckPlugin(
|
||||||
|
name="hitachivsp_sfps",
|
||||||
|
service_name="SFP Port %s",
|
||||||
|
discovery_function=discover_hitachivsp_sfps,
|
||||||
|
check_function=check_hitachivsp_sfps,
|
||||||
|
check_default_parameters={},
|
||||||
|
)
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,45 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from cmk.rulesets.v1.form_specs.validators import LengthInRange
|
||||||
|
from cmk.rulesets.v1.form_specs import Dictionary, DictElement, String, Password, BooleanChoice, DefaultValue
|
||||||
|
from cmk.rulesets.v1.rule_specs import SpecialAgent, Topic, Title, Help
|
||||||
|
|
||||||
|
|
||||||
|
def _formspec():
|
||||||
|
return Dictionary(
|
||||||
|
title=Title("Check HITACHI VSP Storages"),
|
||||||
|
help_text=Help("This rule set selects the special agent for Hitachi VSP "
|
||||||
|
"Storages instead of the normal Check_MK agent and allows "
|
||||||
|
"monitoring via Web API. "),
|
||||||
|
elements={
|
||||||
|
"user": DictElement(
|
||||||
|
required=True,
|
||||||
|
parameter_form=String(
|
||||||
|
title=Title("Username"),
|
||||||
|
custom_validate=(LengthInRange(min_value=1),),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
"password": DictElement(
|
||||||
|
required=True,
|
||||||
|
parameter_form=Password(
|
||||||
|
title=Title("Password"),
|
||||||
|
custom_validate=(LengthInRange(min_value=1),),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"cert": DictElement(
|
||||||
|
required=True,
|
||||||
|
parameter_form=BooleanChoice(
|
||||||
|
title=Title("SSL certificate verification"),
|
||||||
|
prefill=DefaultValue(True),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
rule_spec_agent_config_hitachivsp = SpecialAgent(
|
||||||
|
topic=Topic.STORAGE,
|
||||||
|
name="hitachivsp",
|
||||||
|
title=Title("Hitachi VSP"),
|
||||||
|
parameter_form=_formspec,
|
||||||
|
)
|
@ -0,0 +1,50 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
#
|
||||||
|
# -*- encoding: utf-8; py-indent-offset: 4 -*-
|
||||||
|
# +------------------------------------------------------------------+
|
||||||
|
# | ____ _ _ __ __ _ __ |
|
||||||
|
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
|
||||||
|
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
|
||||||
|
# | | |___| | | | __/ (__| < | | | | . \ |
|
||||||
|
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
|
||||||
|
# | |
|
||||||
|
# | Copyright Mathias Kettner 2017 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.
|
||||||
|
|
||||||
|
from cmk.server_side_calls.v1 import noop_parser, SpecialAgentConfig, SpecialAgentCommand
|
||||||
|
|
||||||
|
|
||||||
|
def _agent_arguments(params, host_config):
|
||||||
|
address = (host_config.ipv4_config or host_config.ipv6_config).address
|
||||||
|
|
||||||
|
args = [
|
||||||
|
"--address", address,
|
||||||
|
"--user", params["user"],
|
||||||
|
"--password", params['password'].unsafe(),
|
||||||
|
]
|
||||||
|
|
||||||
|
if params["cert"] is False:
|
||||||
|
args.append("--no-cert-check")
|
||||||
|
|
||||||
|
yield SpecialAgentCommand(command_arguments=args)
|
||||||
|
|
||||||
|
|
||||||
|
special_agent_hitachivsp = SpecialAgentConfig(
|
||||||
|
name="hitachivsp",
|
||||||
|
parameter_parser=noop_parser,
|
||||||
|
commands_function=_agent_arguments,
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user