Also re-order checks so the ones that can go critical are checked first
Before:
$ /opt/sensu/embedded/bin/check-zpool.rb
sh: tank: not found
sh: tank2: not found
sh: tank: not found
sh: tank2: not found
sh: tank: not found
sh: tank2: not found
CheckZPool CRITICAL: zpool tank3
tank
tank2 has state pool: tank3
state: ONLINE
scan: scrub repaired 0 in XXXXXX with 0 errors on XXXXX config:
NAME STATE READ WRITE CKSUM
tank3 ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
gptid/disk ONLINE 0 0 0
After:
$ /opt/sensu/embedded/bin/check-zpool.rb
CheckZPool CRITICAL: zpool tank2 has state DEGRADED
/opt/sensu/embedded/bin/check-zpool.rb -C 1
CheckZPool CRITICAL: capacity for zpool tank1 is above 1% (currently 60%), zpool tank2 has state DEGRADED, capacity for zpool tank2 is above 1% (currently 60%), capacity for zpool tank3 is above 1% (currently 60%)
Pull Request Checklist
Is this in reference to an existing issue?
2
General
[x] Update Changelog following the conventions laid out here
[N/A] Update README with any necessary configuration snippets
Also re-order checks so the ones that can go critical are checked first
Before:
After:
Pull Request Checklist
Is this in reference to an existing issue?
2
General
[x] Update Changelog following the conventions laid out here
[N/A] Update README with any necessary configuration snippets
[N/A] Binstubs are created if needed
[x] RuboCop passes
[N/A] Existing tests pass
Purpose
To fix issue #2
Known Compatibility Issues
None