Sensu and email

So frustrating. Had to declare handler like:

{
  "handlers": {
    "mailer": {
      "type": "pipe",
      "command": "handler-mailer.rb"
    }
  }
}

and then make sure that the JSON file has the same name as the handler “mail.json”:

{
  "mailer": {
    "admin_gui": "http://127.0.0.1:3000/",
    "mail_from": "alerts@example.com",
    "mail_to": "opsteam@example.com",
    "smtp_address": "email-smtp.us-east-1.amazonaws.com",
    "smtp_port": "587",
    "smtp_username": "USERNAME",
    "smtp_password": "PASSWORD",
    "smtp_domain": "example.com"
  }
}

Also, the arguments passed to JSON are not documented anywhere, other than on some mailing list thread after a google search.

Next up, try and get SNS notifications working (to get both email and SMS).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.