From 25172766880eef32b051b2058c6ecbb4edbfc6c7 Mon Sep 17 00:00:00 2001 From: "Th.L" <thl-cmk@outlook.com> Date: Thu, 18 Mar 2021 18:19:58 +0100 Subject: [PATCH] update project --- agent_based/cisco_asa_sensors.py | 9 +++++---- cisco_asa_sensors.mkp | Bin 2941 -> 2949 bytes 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/agent_based/cisco_asa_sensors.py b/agent_based/cisco_asa_sensors.py index f50cbd0..f1bb35e 100644 --- a/agent_based/cisco_asa_sensors.py +++ b/agent_based/cisco_asa_sensors.py @@ -197,6 +197,8 @@ def parse_cisco_asa_sensors(string_table: List[StringTable]) -> Dict: sensorname = sensorname.replace('Power ', '') sensors['power'].update({sensorname: CiscoAsaSensor( + value=0, + unit='', status=sensorstatus, state_readable=state_readable, )}) @@ -284,7 +286,7 @@ def discovery_cisco_asa_fan(section: Dict) -> DiscoveryResult: yield Service(item=key) -def check_cisco_asa_fan(item, params: TempParamType, section) -> CheckResult: +def check_cisco_asa_fan(item, params, section) -> CheckResult: try: sensor = section['fan'][item] @@ -309,7 +311,7 @@ register.check_plugin( sections=['cisco_asa_sensors'], discovery_function=discovery_cisco_asa_fan, check_function=check_cisco_asa_fan, - check_default_parameters={}, + check_default_parameters={'output_metrics': True}, check_ruleset_name='hw_fans' ) @@ -325,7 +327,7 @@ def discovery_cisco_asa_power(section: Dict) -> DiscoveryResult: yield Service(item=key) -def check_cisco_asa_power(item, params: TempParamType, section) -> CheckResult: +def check_cisco_asa_power(item, params, section) -> CheckResult: try: sensor = section['power'][item] @@ -342,5 +344,4 @@ register.check_plugin( discovery_function=discovery_cisco_asa_power, check_function=check_cisco_asa_power, check_default_parameters={}, - # check_ruleset_name='power_supply' ) \ No newline at end of file diff --git a/cisco_asa_sensors.mkp b/cisco_asa_sensors.mkp index f097b69c596434aa0b758e9b0b19071f887e816c..17827af774d82d30e78636d13b9d178929ebd5c7 100644 GIT binary patch delta 2874 zcmV-A3&r&P7KIlEABzYGy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