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:
}
for sensorname, sensortype, sensorvalue, sensorstatus, sensorunits in string_table[0]:
if sensorstatus.isdigit():
state_readable = get_state_readable(sensorstatus)
sensorstatus = get_sensor_status(sensorstatus)
if sensortype == '8': # Temperature
sensorname = sensorname.replace('Temperature ', '')
sensors['temp'].update({sensorname: CiscoAsaSensor(
value=to_celsius(float(sensorvalue), sensorunits),
unit=sensorunits,
status=sensorstatus,
state_readable=state_readable,
)})
if sensortype == '10': # Fan
sensorname = sensorname.replace('Fan ', '')
sensors['fan'].update({sensorname: CiscoAsaSensor(
value=int(sensorvalue),
unit=sensorunits,
status=sensorstatus,
state_readable=state_readable,
)})
if sensortype == '12': # Power supply
sensorname = sensorname.replace('Power ', '')
sensors['power'].update({sensorname: CiscoAsaSensor(
value=0,
unit='',
status=sensorstatus,
state_readable=state_readable,
)})
if sensorname != '': # for asa context, there are no real sensors.
if sensorstatus.isdigit():
state_readable = get_state_readable(sensorstatus)
sensorstatus = get_sensor_status(sensorstatus)
if sensortype == '8': # Temperature
sensorname = sensorname.replace('Temperature ', '')
sensors['temp'].update({sensorname: CiscoAsaSensor(
value=to_celsius(float(sensorvalue), sensorunits),
unit=sensorunits,
status=sensorstatus,
state_readable=state_readable,
)})
if sensortype == '10': # Fan
sensorname = sensorname.replace('Fan ', '')
sensors['fan'].update({sensorname: CiscoAsaSensor(
value=int(sensorvalue),
unit=sensorunits,
status=sensorstatus,
state_readable=state_readable,
)})
if sensortype == '12': # Power supply
sensorname = sensorname.replace('Power ', '')
sensors['power'].update({sensorname: CiscoAsaSensor(
value=0,
unit='',
status=sensorstatus,
state_readable=state_readable,
)})
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