In my /etc/sensu/config.json I have
“handlers”: {
“email-me”: {
“type”: “pipe”,
“severities”: [
“warning”,
“critical”,
“unknown”,
“ok”
],
“command”: “handler-ses.rb -j ses”
}
}
in /etc/sensu/handler/email-me.json I have
{
“ses”: {
“mail_from”: “someemailAddress”,
“mail_to”: “someemailAddress”,
“use_ami_role”: true,
“access_key”: “My_ACCESS_KEY”,
“secret_key”: “MY_SECRET”,
“region”: “us-east-1”,
“severities”: [“ok”, “warning”]
“subscriptions”: {
“subscription_name”: {
“mail_to”: “someemailAddress”
}
}
}
}
I then restart sensu-server, and check /var/log/sensu/sensu-server.log and try to search for ses, I dont find any ses at all. Which means that sensu is just not picking up the handler.
I know I am missing something basic, please help.
I always recommend using the full path to the binary to reduce ambiguity. Additionally providing the full path will (probably) activate the sensu embedded ruby stuff:
/opt/sensu/embedded/bin/handler-ses.rb
Next, can you try putting all your configuration in /etc/sensu/conf.d/ ? config.json should be loaded though, but for other configuration munging it needs to be in a path sensu recognizes, which normally /etc/sensu/conf.d/
···
On Sat, Dec 24, 2016 at 12:42 PM, Siddharth Jagtiani jsiddharth@mcruiseon.com wrote:
In my /etc/sensu/config.json I have
“handlers”: {
“email-me”: {
“type”: “pipe”,
“severities”: [
“warning”,
“critical”,
“unknown”,
“ok”
],
“command”: “handler-ses.rb -j ses”
}
}
in /etc/sensu/handler/email-me.json I have
{
“ses”: {
“mail_from”: “someemailAddress”,
“mail_to”: “someemailAddress”,
“use_ami_role”: true,
“access_key”: “My_ACCESS_KEY”,
“secret_key”: “MY_SECRET”,
“region”: “us-east-1”,
“severities”: [“ok”, “warning”]
“subscriptions”: {
“subscription_name”: {
“mail_to”: “someemailAddress”
}
}
}
}
I then restart sensu-server, and check /var/log/sensu/sensu-server.log and try to search for ses, I dont find any ses at all. Which means that sensu is just not picking up the handler.
I know I am missing something basic, please help.