sensu-plugins / sensu-plugins-statuspage

Sensu plugins for Statuspage
http://sensu-plugins.io
MIT License
4 stars 7 forks source link

remove handler key from settings #8

Closed chrissav closed 7 years ago

chrissav commented 7 years ago

Pull Request Checklist

Is this in reference to an existing issue? No

General

New Plugins

Purpose

Receiving the following error when running this plugin:

["/etc/sensu/plugins/metrics-statuspageio.rb:46:in `handle': undefined method `[]' for nil:NilClass (NoMethodError)\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.4.2/lib/sensu-handler.rb:81:in `block in <class:Handler>'\n"]

This change started sending metrics to statuspage. handler-statuspage.rb L89 retrieves the api_key and page_id from settings in the same way.

Known Compatibility Issues

No

majormoses commented 7 years ago

released: https://rubygems.org/gems/sensu-plugins-statuspage/versions/1.1.1

majormoses commented 7 years ago

@chrissav thanks for the contribution!