Skip to content

Commit

Permalink
check if SELFTEST is in output
Browse files Browse the repository at this point in the history
  • Loading branch information
gurubert committed Aug 5, 2024
1 parent ba161d8 commit abb44bc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file removed apcaccess/apcaccess-5.3.0.mkp
Binary file not shown.
Binary file added apcaccess/apcaccess-5.3.1.mkp
Binary file not shown.
4 changes: 2 additions & 2 deletions apcaccess/lib/check_mk/base/plugins/agent_based/apcaccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ def check_apcaccess(item, params, section) -> CheckResult:
else:
yield Result(state=State.CRIT,
summary='Status is ' + data.get('STATUS'))
if data.get('SELFTEST') != 'NO':
if 'SELFTEST' in data and data['SELFTEST'] != 'NO':
yield Result(state=State.WARN,
summary='Self-Test is ' + data.get('SELFTEST'))
summary='Self-Test is ' + data['SELFTEST'])

register.check_plugin(
name="apcaccess",
Expand Down

0 comments on commit abb44bc

Please sign in to comment.