Using sensu-chef in cookbook - use_embedded_ruby and sensu_handler

Hi

I have a couple questions regarding using sensu chef recipe in my cookbook

  1. I have set this in my attribute/default.rb

    default[:sensu][:use_embedded_ruby] = true

However I did not see any use_embedded_ruby appear in ocnfig.json and what not. In the repository, this variable is used by this file: https://github.com/sensu/sensu-chef/blob/a39f398c78d1ac679241dcc0bef832d432f2b94f/templates/default/sensu.default.erb

How will this file get generated? Where can I find this file? Is it created on per checker/handler basis?

  1. I am planning to include files from https://github.com/sensu/sensu-community-plugins directly in my cookbooks. I wonder where in my cookbook I should them in?

To explain my question better, lets’ say I want to use a handle like this:

sensu_handler “pagerduty” do
type “pipe”
command “pagerduty.rb”
severities [“ok”, “critical”] end


Where should I put this script https://github.com/sensu/sensu-community-plugins/blob/3ceec149dc3ea45d9016bf59fe3c985f5c094130/handlers/notification/pagerduty.rb inside my cookbook? Under files/handler for example?

Cheers, Tony

I think I can answer my first question now:

The variable use_embedded_ruby will appear in the file /etc/default/sensu

···

On Thursday, 26 February 2015 11:09:42 UTC+11, Anthony Kong wrote:

Hi

I have a couple questions regarding using sensu chef recipe in my cookbook

  1. I have set this in my attribute/default.rb
 default[:sensu][:use_embedded_ruby] = true

However I did not see any use_embedded_ruby appear in ocnfig.json and what not. In the repository, this variable is used by this file: https://github.com/sensu/sensu-chef/blob/a39f398c78d1ac679241dcc0bef832d432f2b94f/templates/default/sensu.default.erb

How will this file get generated? Where can I find this file? Is it created on per checker/handler basis?

  1. I am planning to include files from https://github.com/sensu/sensu-community-plugins directly in my cookbooks. I wonder where in my cookbook I should them in?

To explain my question better, lets’ say I want to use a handle like this:

sensu_handler “pagerduty” do
type “pipe”
command “pagerduty.rb”
severities [“ok”, “critical”] end


Where should I put this script https://github.com/sensu/sensu-community-plugins/blob/3ceec149dc3ea45d9016bf59fe3c985f5c094130/handlers/notification/pagerduty.rb inside my cookbook? Under files/handler for example?

Cheers, Tony