lib/sensu/server/filter.rb
def extension_filter(filter_name, event)
        extension = @extensions[:filters][filter_name]
        if in_filter_time_windows?(extension.definition)
          extension.safe_run(event) do |output, status|
            yield(status == 0, filter_name)
          end
        else
          yield(false, filter_name)
        end
      end
# Determine if an event is filtered by a filter extension.
#
# @param filter_name [String]
# @param event [Hash]
# @yield [filtered] callback/block called with a single
#   parameter to indicate if the event was filtered.
# @yieldparam filtered [TrueClass,FalseClass] indicating if the
#   event was filtered.
# @yieldparam filter_name [String] name of the filter being evaluated
Determine if an event is filtered by a filter extension.
Determine if an event is filtered by a filter extension .
def extension_filter(filter_name, event)
        extension = @extensions[:filters][filter_name]
        if in_filter_time_windows?(extension.definition)
          extension.safe_run(event) do |output, status|
            yield(status == 0, filter_name)
          end
        else
          yield(false, filter_name)
        end
      end
def extension_filter ( filter_name , event ) extension = @extensions [ :filters ] [ filter_name ] if in_filter_time_windows? ( extension . definition ) extension . safe_run ( event ) do | output , status | yield ( status == 0 , filter_name ) end else yield ( false , filter_name ) end end
Determine if an event is filtered by a filter extension.
Determine if an event is filtered by a filter extension .
filter_name
name of the filter being evaluated
name of the filter being evaluated
event
None
]
callback/block called with a single parameter to indicate if the event was filtered.
callback / block called with a single parameter to indicate if the event was filtered .
filtered
indicating if the event was filtered.
indicating if the event was filtered .