Skip to content

Commit

Permalink
renames check plugin files
Browse files Browse the repository at this point in the history
  • Loading branch information
gurubert committed Dec 2, 2024
1 parent c060f44 commit 4c56b63
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 63 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def discover_areca_hba_ldisks(section) -> DiscoveryResult:
for id in section.keys():
yield Service(item=id)

def check_areca_hba_ldisks(item, _no_params, section) -> CheckResult:
def check_areca_hba_ldisks(item, section) -> CheckResult:
if item in section:
vsf = section[item]
state = State.UNKNOWN
Expand All @@ -79,6 +79,7 @@ def check_areca_hba_ldisks(item, _no_params, section) -> CheckResult:
name = "areca_hba_ldisks",
parse_function = parse_areca_hba_ldisks,
detect = startswith(".1.3.6.1.2.1.1.2.0", ".1.3.6.1.4.1.18928.1"),
# detect = lambda oid: True,
fetch = SNMPTree(
base = ".1.3.6.1.4.1.18928.1.2.5.1.1",
oids = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,30 +88,30 @@ def check_areca_hba_pdisks(item, _no_params, info):
return (3, "Disk not found in agent output")


check_info["areca_hba_pdisks"] = {
"check_function" : check_areca_hba_pdisks,
"inventory_function" : inventory_areca_hba_pdisks,
"has_perfdata" : False,
"service_description" : "PDisk Enc/Sl %s",
# Find Areca SAS MIB
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.18928.1"),
"snmp_info" : [(".1.3.6.1.4.1.18928.1.2.3",
# unclear: how does it look in jbod mode?
# where does i get pony?
# There's up to 8 enclosures, "1" is hardcoded having 8 slots.
# probably it's the ext. SAS connector.
[ "1", "2", "3", "4", "5", "6", "7", "8" ],
# Below each enclosure there's the following structure for disk data
[ "4.1.1", # The slot ids
"4.1.2", # The slot descrs
"4.1.3", # The disk model
"4.1.4", # The disk fw
"4.1.5", # The disk size
# The MIB seems wrong about the next ones
"4.1.6", #
"4.1.7", #
"4.1.8", # Textual disk state
]
)],
}
# check_info["areca_hba_pdisks"] = {
# "check_function" : check_areca_hba_pdisks,
# "inventory_function" : inventory_areca_hba_pdisks,
# "has_perfdata" : False,
# "service_description" : "PDisk Enc/Sl %s",
# # Find Areca SAS MIB
# "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.18928.1"),
# "snmp_info" : [(".1.3.6.1.4.1.18928.1.2.3",
# # unclear: how does it look in jbod mode?
# # where does i get pony?
# # There's up to 8 enclosures, "1" is hardcoded having 8 slots.
# # probably it's the ext. SAS connector.
# [ "1", "2", "3", "4", "5", "6", "7", "8" ],
# # Below each enclosure there's the following structure for disk data
# [ "4.1.1", # The slot ids
# "4.1.2", # The slot descrs
# "4.1.3", # The disk model
# "4.1.4", # The disk fw
# "4.1.5", # The disk size
# # The MIB seems wrong about the next ones
# "4.1.6", #
# "4.1.7", #
# "4.1.8", # Textual disk state
# ]
# )],
# }

Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,22 @@ def check_areca_hba_raidsets(item, _no_params, info):
return (3, "UNKW - Raidset not found in agent output")


check_info["areca_hba_raidsets"] = {
"check_function" : check_areca_hba_raidsets,
"inventory_function" : inventory_areca_hba_raidsets,
"has_perfdata" : False,
"service_description" : "Raid set %s",
# Find Areca SAS MIB
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.18928.1"),
"snmp_info" : [(".1.3.6.1.4.1.18928.1.2.4.1.1",
# Below each enclosure there's the following structure for disk data
[ #"2", "4"
"1", # Raidset id
"2", # Raidset name
"4", # Raidset State
"7", # Member disk size
"8", # Member disk names and states
]
)],
}
# check_info["areca_hba_raidsets"] = {
# "check_function" : check_areca_hba_raidsets,
# "inventory_function" : inventory_areca_hba_raidsets,
# "has_perfdata" : False,
# "service_description" : "Raid set %s",
# # Find Areca SAS MIB
# "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.18928.1"),
# "snmp_info" : [(".1.3.6.1.4.1.18928.1.2.4.1.1",
# # Below each enclosure there's the following structure for disk data
# [ #"2", "4"
# "1", # Raidset id
# "2", # Raidset name
# "4", # Raidset State
# "7", # Member disk size
# "8", # Member disk names and states
# ]
# )],
# }

Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ def check_areca_hba_temp(item, params, info):
return (3, "UNKNOWN - sensor not found in agent output")


check_info["areca_hba_temp"] = {
"check_function" : check_areca_hba_temp,
"inventory_function" : inventory_areca_hba_temp,
"has_perfdata" : True,
"service_description" : "Temperature %s",
# Find Areca SAS MIB
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.18928.1"),
"snmp_info" : [(".1.3.6.1.4.1.18928.1.2.2.1.10.1", [ "1", "2", "3" ])],
}
# check_info["areca_hba_temp"] = {
# "check_function" : check_areca_hba_temp,
# "inventory_function" : inventory_areca_hba_temp,
# "has_perfdata" : True,
# "service_description" : "Temperature %s",
# # Find Areca SAS MIB
# "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.18928.1"),
# "snmp_info" : [(".1.3.6.1.4.1.18928.1.2.2.1.10.1", [ "1", "2", "3" ])],
# }

Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ def check_areca_hba_voltages(item, _no_params, info):
return (3, "UNKNOWN - Voltage sensor not found in agent output")


check_info["areca_hba_voltages"] = {
"check_function" : check_areca_hba_voltages,
"inventory_function" : inventory_areca_hba_voltages,
"has_perfdata" : True,
"service_description" : "Voltage %s",
# Find Areca SAS MIB
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.18928.1"),
"snmp_info" : [(".1.3.6.1.4.1.18928.1.2.2.1.8.1", [ "1", "2", "3" ])],
}
# check_info["areca_hba_voltages"] = {
# "check_function" : check_areca_hba_voltages,
# "inventory_function" : inventory_areca_hba_voltages,
# "has_perfdata" : True,
# "service_description" : "Voltage %s",
# # Find Areca SAS MIB
# "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.18928.1"),
# "snmp_info" : [(".1.3.6.1.4.1.18928.1.2.2.1.8.1", [ "1", "2", "3" ])],
# }

0 comments on commit 4c56b63

Please sign in to comment.