Giter Club home page Giter Club logo

sensu-plugins-mailer's Introduction

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

sensu-plugins-mailer's People

Contributors

analytically avatar bgeesaman avatar corro avatar eheydrick avatar els-blasterspike avatar ericlakich avatar jk-build avatar joshbeard avatar mattyjones avatar miguelcnf avatar nathanhruby avatar oba11 avatar sstarcher avatar tas50 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.