Sha256: 4d16a1720a1ac9f0b348a67b07ab86d7a89a25c8bf78a1fc18080bac7507f4e4
Contents?: true
Size: 554 Bytes
Versions: 3
Compression:
Stored size: 554 Bytes
Contents
#!/usr/bin/env ruby require 'flapjack/filters/base' module Flapjack module Filters class UnscheduledMaintenance include Base def block?(check, opts = {}) new_state = opts[:new_state] result = check.in_unscheduled_maintenance? && !('acknowledgement'.eql?(new_state.action) || Flapjack::Data::Condition.healthy?(new_state.condition)) Flapjack.logger.debug { "Filter: Unscheduled Maintenance: #{result ? "block" : "pass"}" } result end end end end
Version data entries
3 entries across 3 versions & 1 rubygems