sensu-plugins/sensu-plugins-hipchat

Filtering in sensu-plugin is deprecated

Closed this issue · 1 comments

Just setting up Sensu, added the hipchat handler, simulated some errors and got this in the logs:

{
  "timestamp": "2016-11-25T15:34:43.697302+1100",
  "level": "info",
  "message": "handler output",
  "handler": {
    "command": " /opt/sensu/embedded/bin/handler-hipchat.rb",
    "type": "pipe",
    "severities": [
      "ok",
      "critical",
      "unknown"
    ],
    "name": "hipchat"
  },
  "output": [
    "warning: event filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
    warning: occurrence filtering in sensu-plugin is deprecated, see http://bit.ly/sensu-plugin
    only handling every 180 occurrences: my-first-sensu-client/aroflo-es-local-health"
  ]
}
Evesy commented

Hi @OzWookiee

As noted by the warning, occurrence filtering within sensu-plugin was deprecated in 1.4.5: https://blog.sensuapp.org/deprecating-event-filtering-in-sensu-plugin-b60c7c500be3

If you are not already I'd recommend switching to use the built in occurrences filter.
You can then also disable deprecated filtering globally to suppress these messages (Switch to using the new occurrences filter first though!) with the below snippet of sensu configuration (Placed somewhere inside /etc/sensu/conf.d/):

"sensu_plugin": {
  "disable_deprecated_filtering": true
}

The deprecated filtering method is disabled by default in sensu-plugin version 2.0.0, however work needs to be done move this (and other) to that new version, as per sensu-plugins/community#26

If you have any questions around the above changes please let me know.

Cheers,
Mike