summaryrefslogtreecommitdiff
path: root/extra/nagios_check_failing_nodes.rb
diff options
context:
space:
mode:
authorElvin Efendi <elvin.efendiyev@gmail.com>2016-01-04 10:22:00 -0500
committerElvin Efendi <elvin.efendiyev@gmail.com>2016-01-04 10:22:00 -0500
commitdb5545d760a5baad052370504dd03585ac6f3215 (patch)
tree1c8923703da25cbc56ad3dea2b59d639c39a5b22 /extra/nagios_check_failing_nodes.rb
parentef1a59d2b29df5b00246ee34eba96b0cf4927fa2 (diff)
parentf112dfa0c604ae1c990f6411a002806924c00bf3 (diff)
Merge remote-tracking branch 'upstream/master' into merge-upstream
Diffstat (limited to 'extra/nagios_check_failing_nodes.rb')
-rw-r--r--extra/nagios_check_failing_nodes.rb8
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