Skip to content
Sensu SMS plugins
Ruby
Branch: master
Clone or download
dependabot-bot and majormoses Update rake requirement from ~> 10.0 to ~> 12.3
Updates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.
- [Release notes](https://github.com/ruby/rake/releases)
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rake/commits/v12.3.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
Latest commit bb36493 Nov 1, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
bin remove debugging Dec 20, 2016
lib
test
.gitignore
.rubocop.yml
.travis.yml
CHANGELOG.md Ruby 2.4.1 testing Jul 13, 2017
CONTRIBUTING.md
Gemfile
LICENSE
README.md
Rakefile
sensu-plugins-sms.gemspec

README.md

Sensu-Plugins-sms

Build Status Gem Version Code Climate Test Coverage Dependency Status

Functionality

Files

  • bin/check-sms
  • bin/handler-playsms
  • bin/metrics-sms-bulk
  • bin/metrics-sms-if
  • bin/metrics-sms

Usage

FreeSMS

{
  "free_sms_alert": {
    "carrier_portal": {
      // US carriers:
      "att": "%number%@txt.att.net",
      "verizon": "%number%@vtext.com",
      "tmobile": "%number%@tmomail.net",
      "sprint": "%number%@messaging.sprintpcs.com",
      "virgin": "%number%@vmobl.com",
      "uscellular": "%number%@email.uscc.net",
      "nextel": "%number%@messaging.nextel.com",
      "boost": "%number%@myboostmobile.com",
      "alltel": "%number%@message.alltel.com",
      // Canadian carriers:
      "telus": "%number%@msg.telus.com",
      "rogers": "%number%@pcs.rogers.com",
      "fido": "%number%@fido.ca",
      "bell": "%number%@txt.bell.ca",
      "mts": "%number%@text.mtsmobility.com",
      "kudo": "%number%@msg.koodomobile.com",
      "presidentschoice": "%number%@txt.bell.ca",
      "sasktel": "%number%@sms.sasktel.com",
      "solo": "%number%@txt.bell.ca",
      "virgincanada": "%number%@vmobile.ca",
      // Dummy carrier (in case you actually want to send an email):
      "email": "%number%"
    },
    "smtp_address": "localhost",
    "smtp_domain":  "localhost.localdomain",
    "smtp_port":    "25",
    "mail_from":    "sensu_alert@mydomain.com"
  }
}
{
  "free_sms_alert": {
    "alert_recipient_mappings": {

      "ttutone": {
        "name": "Tommy Tutone",
        "carrier": "att",
        "number": "800-867-5309"
      },

      "ghostbuster": {
        "name": "Ghost Busters",
        "carrier": "tmobile",
        "number": "800-555-2368"
      }
    }
  }
}

playSMS

Create a json config file with your host, API user, and API secret.

{
  "playsms": {
    "host": "http://playsms.example.com",
    "api_user": "sensu",
    "api_secret": "XXXXX"
  }
}

Set your check to use the handler and define the playsms recipients.

{
  "checks": {
    "check-disk-usage": {
      "command": "check-disk-usage.rb -w :::disk.warning|80::: -c :::disk.critical|90:::",
      "subscribers": [
        "production"
      ],
      "handlers": [
        "playsms"
      ],
      "playsms": {
        "recipients": [
          "1234567890",
          "@joe_smith",
          "#operations"
        ]
      },
      "interval": 60,
    }
  }
}

Installation

Installation and Setup

Notes

You can’t perform that action at this time.