Skip to content

Commit

Permalink
Ignoring another PSU status flag
Browse files Browse the repository at this point in the history
  • Loading branch information
guilbaults committed Mar 26, 2020
1 parent 1e86942 commit 437f6d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions check_jbod-el7.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: check_jbod
Version: 0.0.5
%global gittag 0.0.5
Version: 0.0.6
%global gittag 0.0.6
Release: 1%{?dist}
Summary: Nagios script to check the status and fault in Xyratex JBOD.

Expand Down Expand Up @@ -42,6 +42,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/lib64/nagios/plugins/%{name}

%changelog
* Thu Mar 26 2020 Simon Guilbault <[email protected]> 0.0.6-1
- Ignoring another PSU status flag
* Wed Mar 25 2020 Simon Guilbault <[email protected]> 0.0.5-1
- Increasing fan maximum speed threshold
* Thu Mar 19 2020 Simon Guilbault <[email protected]> 0.0.4-1
Expand Down
10 changes: 7 additions & 3 deletions check_jbod.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,19 @@ def get_sg_jbods():
number=psu_number,
status=psu[1],
))
if psu[3] != 'Hot swap=1, Fail=0, Requested on=0, Off=0, Overtmp fail=0' and psu[3] != 'Hot swap=1, Fail=0, Requested on=1, Off=0, Overtmp fail=0': # noqa: E501
if psu[3] not in [
'Hot swap=1, Fail=0, Requested on=0, Off=0, Overtmp fail=0',
'Hot swap=1, Fail=0, Requested on=1, Off=0, Overtmp fail=0',
'Hot swap=0, Fail=0, Requested on=0, Off=0, Overtmp fail=0'
]:
criticals.append('PSU{number} {status}'.format(
number=psu_number,
status=psu[1],
status=psu[3],
))
if psu[4] != 'Temperature warn=0, AC fail=0, DC fail=0':
criticals.append('PSU{number} {status}'.format(
number=psu_number,
status=psu[1],
status=psu[4],
))

if args.volt:
Expand Down

0 comments on commit 437f6d1

Please sign in to comment.