Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit 3b34027b authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

update project

parent bddeee50
No related branches found
No related tags found
No related merge requests found
...@@ -169,39 +169,40 @@ def parse_cisco_asa_sensors(string_table: List[StringTable]) -> Dict: ...@@ -169,39 +169,40 @@ def parse_cisco_asa_sensors(string_table: List[StringTable]) -> Dict:
} }
for sensorname, sensortype, sensorvalue, sensorstatus, sensorunits in string_table[0]: for sensorname, sensortype, sensorvalue, sensorstatus, sensorunits in string_table[0]:
if sensorstatus.isdigit(): if sensorname != '': # for asa context, there are no real sensors.
state_readable = get_state_readable(sensorstatus) if sensorstatus.isdigit():
sensorstatus = get_sensor_status(sensorstatus) state_readable = get_state_readable(sensorstatus)
sensorstatus = get_sensor_status(sensorstatus)
if sensortype == '8': # Temperature
sensorname = sensorname.replace('Temperature ', '') if sensortype == '8': # Temperature
sensorname = sensorname.replace('Temperature ', '')
sensors['temp'].update({sensorname: CiscoAsaSensor(
value=to_celsius(float(sensorvalue), sensorunits), sensors['temp'].update({sensorname: CiscoAsaSensor(
unit=sensorunits, value=to_celsius(float(sensorvalue), sensorunits),
status=sensorstatus, unit=sensorunits,
state_readable=state_readable, status=sensorstatus,
)}) state_readable=state_readable,
)})
if sensortype == '10': # Fan
sensorname = sensorname.replace('Fan ', '') if sensortype == '10': # Fan
sensorname = sensorname.replace('Fan ', '')
sensors['fan'].update({sensorname: CiscoAsaSensor(
value=int(sensorvalue), sensors['fan'].update({sensorname: CiscoAsaSensor(
unit=sensorunits, value=int(sensorvalue),
status=sensorstatus, unit=sensorunits,
state_readable=state_readable, status=sensorstatus,
)}) state_readable=state_readable,
)})
if sensortype == '12': # Power supply
sensorname = sensorname.replace('Power ', '') if sensortype == '12': # Power supply
sensorname = sensorname.replace('Power ', '')
sensors['power'].update({sensorname: CiscoAsaSensor(
value=0, sensors['power'].update({sensorname: CiscoAsaSensor(
unit='', value=0,
status=sensorstatus, unit='',
state_readable=state_readable, status=sensorstatus,
)}) state_readable=state_readable,
)})
return sensors return sensors
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment