bin/check-marathon-task.rb in sensu-plugins-mesos-2.1.0 vs bin/check-marathon-task.rb in sensu-plugins-mesos-2.1.1
- old
+ new
@@ -119,10 +119,10 @@
message = "#{ok_count}/#{expected} #{config[:task]} tasks running"
message << ":\n" << unhealthy.join("\n") if unhealthy.any?
- critical message if unhealthy.any? || ok_count < config[:instances]
+ critical message if unhealthy.any? || ok_count < expected
ok message
rescue Errno::ECONNREFUSED, SocketError
failures << "Marathon on #{s} could not be reached"
rescue => err