sensu-plugins / sensu-plugin

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

Deprecated filters: event_exists? broken (sensu 0.26.3) #156

Closed Hydrochoerus closed 7 years ago

Hydrochoerus commented 7 years ago

At least filter_dependencies depends on event_exists function (sensu-handler.rb), which is broken. I would appreciate if this was fixed, as there is no replacement for the deprecated dependency filtering yet.

def event_exists?(client, check)
      api_request(:GET, '/event/' + client + '/' + check).code == '200'
end

With the new API should be (event => events):

def event_exists?(client, check)
      api_request(:GET, '/events/' + client + '/' + check).code == '200'
end

I am running sensu 0.26.3.

cwjohnston commented 7 years ago

Hi @Hydrochoerus, thanks for opening this issue. I've marked it as a bug and we can probably publish a fix for it shortly. For what it's worth, it looks like this has been broken since 0.25.0 (circa 2016-06-13) due to the removal of singular form endpoints in Sensu's API.

cwjohnston commented 7 years ago

Closed by #157