Skip to content

bovy89/sensu-plugins-mailer

This branch is 59 commits behind sensu-plugins/sensu-plugins-mailer:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Matt Jones
Mar 2, 2016
89fa094 · Mar 2, 2016

History

69 Commits
Mar 2, 2016
Feb 26, 2016
Mar 2, 2016
Feb 5, 2016
Feb 17, 2015
Feb 17, 2015
Aug 27, 2015
Mar 2, 2016
Mar 2, 2016
Jul 12, 2015
Feb 17, 2015
Jun 2, 2015
Mar 2, 2016
Mar 2, 2016
Mar 2, 2016

Repository files navigation

Sensu-Plugins-mailer

Build Status Gem Version Code Climate Test Coverage Dependency Status

Functionality

Files

  • bin/handler-mailer-mailgun.rb
  • bin/handler-mailer-ses.rb
  • bin/handler-mailer.rb

Usage

The following three configuration variables must be set if you want mailer to use remote SMTP settings:

smtp_address - defaults to "localhost"
smtp_port - defaults to "25"
smtp_domain - defaults to "localhost.localdomain"

There is an optional subscriptions hash which can be added to your mailer.json file. This subscriptions hash allows you to define individual mail_to addresses for a given subscription. When the mailer handler runs it will check the clients subscriptions and build a mail_to string with the default mailer.mail_to address as well as any subscriptions the client subscribes to where a mail_to address is found. There can be N number of hashes inside of subscriptions but the key for a given hash inside of subscriptions must match a subscription name.

Optionally, you can specify your own ERB template file to use for the message body. The order of precedence for templates is: command-line argument (-t), client config called "template", the mailer handler config, default.

{
  "mailer": {
    "mail_from": "[email protected]",
    "mail_to": "[email protected]",
    "smtp_address": "smtp.example.org",
    "smtp_port": "25",
    "smtp_domain": "example.org",
    "template": "/optional/path/to/template.erb",
    "subscriptions": {
      "subscription_name": {
        "mail_to": "[email protected]"
      }
    }
  }
}

handler-mailer-mailgun

{
  "mailer-mailgun": {
    "mail_from": "[email protected]",
    "mail_to": "[email protected]",
    "mg_apikey": "mailgunapikeygoeshere",
    "mg_domain": "mailgun.domain.com"
  }
}

handler-mailer-ses

{
  "mailer-ses": {
    "mail_from": "[email protected]",
    "mail_to": "[email protected]",
    "aws_access_key": "myawsaccesskey",
    "aws_secret_key": "myawssecretkey",
    "aws_ses_endpoint": "email.us-east-1.amazonaws.com"
  }
}

handler-mailer

{
  "mailer": {
    "admin_gui": "http://admin.example.com:8080/",
    "mail_from": "[email protected]",
    "mail_to": "[email protected]",
    "smtp_address": "smtp.example.org",
    "smtp_port": "25",
    "smtp_domain": "example.org"
  }
}

Installation

Installation and Setup

Notes

About

This plugin is an email handler for Sensu.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%