sensu-plugins / sensu-plugin

A framework for writing Sensu plugins & handlers with Ruby.

Home Page:http://sensuapp.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong check settings in Changelog?

donnex opened this issue · comments

I'm currently setting up filtering with Sensu and I've read up on the latest changes. When reading the Changelog (1.4.0) for sensu-plugin it states that you should set deprecated_filtering_enabled and deprecated_occurrence_filtering_enabled on checks to disable filtering in sensu-plugins. I did this and it did nothing at all. I still got deprecated warnings and sensu-plugin still checked occurrences.

Only after checking the source code I found the problem. I think the information in the Changelog is wrong. The source code checks for enable_deprecated_occurrence_filtering but the Changelog says deprecated_occurrence_filtering_enabled. It's the same for deprecated_filtering_enabled.

When using the correct attribute everything works as expected.

Filtering of events can now be disabled on a per-check basis by setting value of custom attribute deprecated_filtering_enabled to false (#139 via @cwjohnston)

Filtering of events based on occurrences can now be disabled on a per-check basis by setting value of custom attribute deprecated_occurrence_filtering_enabled to false (#139 via @cwjohnston)

  @event['check']['enable_deprecated_occurrence_filtering'].nil? || @event['check']['enable_deprecated_occurrence_filtering'] == true

@donnex thanks for bringing this to our attention, would you care to review the change proposed here?

Sure, the changes looks good to me. Now it states the correct attributes. Good idea to also add the information to the README.

Closed by #153