Browse files

Fix for newer monit

  • Loading branch information...
1 parent 552a1a4 commit 3b1ec12d4320c12ccb7dacd11a844e07ea2018aa @brianjlandau brianjlandau committed Jun 16, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/monit.rb
View
4 app/models/monit.rb
@@ -9,7 +9,7 @@ def statuses
output = `#{format_command('summary')}`.scan(/Remote Host '.*_(\d+)'[ ]*(.*)$/)
output.inject({}) do |coll, (site_id, status)|
- coll[site_id.to_i] = (status == "online with all services" ? "success" : "fail")
+ coll[site_id.to_i] = (status =~ /online with all services/i ? "success" : "fail")
coll
end
end
@@ -19,4 +19,4 @@ def statuses
def format_command(command)
"#{File.join(monk_settings(:monit_bin_dir), 'monit')} #{monk_settings(:monit_cli_options)} #{command}"
end
-end
+end

0 comments on commit 3b1ec12

Please sign in to comment.