Sensu-Plugins-sms
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,
}
}
}