sensu-plugins / sensu-plugin

A framework for writing Sensu plugins & handlers with Ruby.
http://sensuapp.org
MIT License
126 stars 117 forks source link

Wrong check settings in Changelog? #152

Closed donnex closed 8 years ago

donnex commented 8 years ago

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_filteringenabled and _deprecated_occurrence_filteringenabled 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_occurrencefiltering but the Changelog says _deprecated_occurrence_filteringenabled. It's the same for _deprecated_filteringenabled.

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
cwjohnston commented 8 years ago

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

donnex commented 8 years ago

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

cwjohnston commented 8 years ago

Closed by #153