diff options
author | Marno van der Molen <marnovandermolen@acknowledge.nl> | 2015-11-03 08:04:55 +0100 |
---|---|---|
committer | Marno van der Molen <marnovandermolen@acknowledge.nl> | 2015-11-03 08:04:55 +0100 |
commit | 97a1c5c982dff389c205cae1b074cd0f1cd7af60 (patch) | |
tree | d0424dd25170ffbd7c30643a2cbae3467fbe860b /extra/nagios_check_failing_nodes.rb | |
parent | af41630ddb0b404cfc21a209e21395759fc2a8a7 (diff) |
Improve critical/pending/ok logic for nagios check
Diffstat (limited to 'extra/nagios_check_failing_nodes.rb')
-rw-r--r-- | extra/nagios_check_failing_nodes.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/extra/nagios_check_failing_nodes.rb b/extra/nagios_check_failing_nodes.rb index 27a5c66..abb34ba 100644 --- a/extra/nagios_check_failing_nodes.rb +++ b/extra/nagios_check_failing_nodes.rb @@ -23,12 +23,12 @@ json.each do |node| end end -if pending - puts '[WARN] Pending backup: ' + pending_nodes.join(',') - exit 1 -elsif critical +if critical puts '[CRIT] Unable to backup: ' + critical_nodes.join(',') exit 2 +elsif pending + puts '[WARN] Pending backup: ' + pending_nodes.join(',') + exit 1 else puts '[OK] Backup of all nodes completed successfully.' exit 0 |