Skip to content

Instantly share code, notes, and snippets.

@akahigeg
Created April 3, 2014 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akahigeg/9949805 to your computer and use it in GitHub Desktop.
Save akahigeg/9949805 to your computer and use it in GitHub Desktop.
#
# Cookbook Name:: sensu-mailer-sample
# Recipe:: default
#
sensu_gem "mail"
mailer_rb_path = "#{node.sensu.directory}/handlers/mailer.rb"
cookbook_file mailer_rb_path do
source "mailer.rb"
owner "sensu"
group "sensu"
mode "0750"
end
cookbook_file "#{node.sensu.directory}/conf.d/mailer.json" do
source "mailer.json"
owner "sensu"
group "sensu"
mode "0640"
end
sensu_handler "mailer" do
type "pipe"
command mailer_rb_path
end
{
"mailer": {
"mail_from": "sensu@example.com",
"mail_to": "member@example.com",
"smtp_enable_starttls_auto": "false"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment