No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
The Sensu Core built-in occurrences filter
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Sensu::Extensions::Occurrences

This filter extension provides the Sensu Core built-in filter occurrences.

This filter provides the functionality that will soon be removed from the sensu-plugin handler library. Cameron Johnston wrote a great blog post on this topic, Deprecating Event Filtering in sensu-plugin.

The occurrences filter will determine if an event occurrence count meets the user defined requirements in the event check definition. Users can specify a minimum number of occurrences before an event will be passed to a handler. Users can also specify a refresh time, in seconds, to reset where recurrences are counted from.

Build Status

Configuration

The occurrences filter is included in every install of Sensu. To apply the filter to handler, use the "filter" or "filters" handler definition attribute.

For example:

{
  "handlers": {
    "email": {
      "...": "...",
      "filter": "occurrences"
    }
  }
}

or

{
  "handlers": {
    "email": {
      "...": "...",
      "filters": ["occurrences"]
    }
  }
}

The occurrences filter uses two custom check definition attributes, occurrences, and refresh.

occurrences: The number of event occurrences that must occur before an event is handled for the check (default is 1).

refresh: Time in seconds until the event occurrence count is considered reset for the purpose of counting occurrences, to allow an event for the check to be handled again (default is 1800). For example, a check with a refresh of 1800 will have its events (recurrences) handled every 30 minutes, to remind users of the issue.

For example:

{
  "checks": {
    "check-http": {
      "...": "...",
      "occurrences": 2,
      "refresh": 3600
    }
  }
}