SimpleFinance / chef-handler-sensu-event

Send an arbitrary event to your Sensu server upon Chef failure
Apache License 2.0
8 stars 3 forks source link

Defaults handling not working #6

Open jhmartin opened 10 years ago

jhmartin commented 10 years ago

It seems I must pass the server name in the chef_handler directive (localhost) otherwise I get:

[2014-07-18T11:54:57-04:00] ERROR: Report handler Chef::Handler::SensuEvent raised # [2014-07-18T11:54:57-04:00] ERROR: /var/chef/handlers/chef-handler-sensu-event.rb:41:in initialize' [2014-07-18T11:54:57-04:00] ERROR: /var/chef/handlers/chef-handler-sensu-event.rb:41:innew' [2014-07-18T11:54:57-04:00] ERROR: /var/chef/handlers/chef-handler-sensu-event.rb:41:in `report'

jakedavis commented 10 years ago

Huh, that is unexpected. I think moving to the following style should ensure the defaults always work:

https://github.com/SimpleFinance/chef-handler-spinup-complete/blob/master/lib/chef-handler-spinup-complete.rb#L33

I'll PR this (or you're more than welcome to) later today -- I'm hopping in the car for a couple hours in a moment here, but should be able to get to it in the afternoon.