Icinga SMS notification without an SMS gateway
Icinga SMS notification sends the duty admin a text naming the host, the check and the time when something goes Down at night. Icinga 2 already mails each problem, so you add one User object with your Welco address and one apply rule. Nothing gets installed on the master.
7-day free trial, 15 message creditsCard required for verificationNo charge for 7 daysEmail reminder before billing
- One User object and one apply rule
- No SMS gateway or modem
- No per-user fees
Works by email with
- Icinga
Published:
A network map watched by Icinga 2: five hosts answer pings until app03 goes critical (/var 412 MB free) and the monitor raises the alert. The email reaches Welco and the phone shows: “Welco: [app03] disk /var CRITICAL, 412 MB free at 4:18 AM. Reply STOP to opt out.”
What the duty admin gets from Icinga texts
One phone wakes up, not ten
A Critical service at 2 AM reaches whoever has duty tonight. The rest of the team sleeps.
Your filters pick the states
The user's
stateslist lets Down and Critical through. Warning and Unknown stay in email.One text per problem
Set
interval = 0and Icinga sends a single notice, not a fresh one every half hour.Mail to icingaadmin carries on
Users who get alert email today keep getting it. The Welco user is only one more recipient.
What you need before you start
Allow about 20 minutes for one admin who can edit Icinga 2 objects. Other tools use the same email idea, as the IT monitoring text alerts overview shows.
- Icinga 2 with working mail. If
icingaadmingets alert emails today, the mail command and scripts are fine. - Write access to
/etc/icinga2/conf.d/, or admin rights in Icinga Director if your objects live there. - A verified Welco account and your Welco address. Start free to get one.
- On-call admins who joined from your Welco invite with their own mobile. Each confirms by replying YES. They need no app.
Set up Icinga SMS notification in 5 steps
Icinga 2 decides who hears about a problem through User objects and apply Notification rules. You add one of each. In Director, use Users and an apply rule under Notifications.
Approve the Icinga sender
Open a recent alert email and note the From address, often
icinga@plus the server name. Welco can then lock sending to your monitor's address. Mail from anywhere else is refused.Create a user for the on-call phone
Add a
Userobject whoseemailis your Welco address. Itsstatesandtypesfilters choose what may become a text.states = [ Down, Critical ]keeps warnings and unknowns out of the text stream.- Add
UpandOKwithtypes = [ Problem, Recovery ]if your team wants the all-clear too.
Apply a notification rule
Write one
apply Notificationrule for hosts and one for services. Import the stockmail-host-notificationandmail-service-notificationtemplates, list your new user, and assign with a filter such as"critical-servers" in host.groups.Set the repeat interval
By default Icinga 2 repeats a notification every 30 minutes while a problem lasts. Set
interval = 0on the rule to text once, orinterval = 2hfor a slow reminder.Check the config and send a test
Run
icinga2 daemon -C, then reload withsystemctl reload icinga2. In Icinga Web 2, open a host and send a custom notification. Start with a Welco safe test run to see the result in the feed first.
Example Icinga 2 objects
A starting point for a file like conf.d/welco.conf. Change the group name and the address to match your setup.
object User "welco-oncall" {
display_name = "On-call phone (Welco)"
email = "your Welco address"
states = [ Up, Down, OK, Critical ]
types = [ Problem, Recovery ]
}
apply Notification "text-oncall" to Service {
import "mail-service-notification"
users = [ "welco-oncall" ]
interval = 0
assign where "critical-servers" in host.groups
}One user object between Icinga and the on-call phone
Verify your business, invite your duty admins and paste your Welco address into the user.
7-day free trial, 15 message creditsCard required for verificationNo charge for 7 daysEmail reminder before billing
An Icinga ping alert before and after
The stock Icinga mail script adds a banner, the full plugin output and an empty comment block. Welco keeps the check, the host and the time.
Alert email from icinga@mon01.example.net, subject “[PROBLEM] ping4 on dist-sw-4 is CRITICAL!”. Welco trims it to one text of 89 characters: “Welco: [dist-sw-4] ping4 CRITICAL, 100% packet loss at 10:47 PM. Reply STOP to opt out.”
Text received: Welco: [dist-sw-4] ping4 CRITICAL, 100% packet loss at 10:47 PM. Reply STOP to opt out.
Characters247891 credit
You can also shorten the email at the source by editing the subject in the mail script. Or let Welco trim long alerts to one text.
Tune Icinga texts for night duty
Icinga filters before the email leaves, and Welco filters again once it lands. The credit union IT case study shows a small team running nights this way.
Recovery is your call
Recovery is a notification type. Keep it in the user's
typesso the admin can go back to sleep, or drop it to leave all-clears in email.Flapping checks stay off the phone
Leave
FlappingStartandFlappingEndout oftypes. A check that bounces between OK and Critical then texts nobody.Patch nights stay silent
Icinga holds problem notices for objects in a scheduled downtime. Keep
DowntimeStart,DowntimeEndandDowntimeRemovedout oftypesas well.Nights to the duty phone
Give the rule a
periodsuch asoffhours, or let Welco's night and weekend routing choose the phone by hour.Dependencies before a flood
Dependencyobjects stop hosts behind a down parent switch from notifying. Welco can then cap a burst of alerts that still gets through.Several admins, one user
One Welco address reaches several phones per alert, each once. That beats one Icinga user per person when staff change.
When an Icinga text doesn't show up
Work from the Icinga side outward and stop at the first row that fits.
No notification line in icinga2.log
- Where to look
- The user's
statesortypesfilter, or theassign whereline, is too narrow.
The notification fired but no mail left
- Where to look
- Test the local mail command on the server. The stock scripts hand off to it.
The Welco feed shows a refused message
- Where to look
- Approve the exact From address the Icinga mail scripts use.
The alert is in the feed but no phone buzzed
- Where to look
- That admin hasn't confirmed with YES yet, or the number is a landline. Text delivery tracking names the cause.
Frequently asked questions
Do I need an Icinga module or an SMS gateway to send texts?
Can night problems go to one admin and daytime problems to the team?
period at a TimePeriod, or keep Icinga sending all day and let a Welco time rule pick the phone. One Welco address can also reach several admins, and each phone gets the alert once.Will recovery, flapping and downtime notices become texts?
Recovery, FlappingStart, FlappingEnd and the downtime types to keep them in email. Icinga also holds problem notices while a host sits in a downtime.Can the duty admin acknowledge an Icinga problem by replying to the text?
Acknowledgement out of types so that step sends no text.Should I add the Welco user in Icinga Director or in config files?
What do Icinga texts cost?
Turn your next Icinga problem into a text
One user, one apply rule and your Welco address. That's the whole change.
7-day free trial, 15 message creditsCard required for verificationNo charge for 7 daysEmail reminder before billing