Icinga2 and Sprint SMS Notifications?


We are attempting to set up sending notifications via SMS to our team. I have it confirmed working with T-Mobile and RepublicWireless. But we cannot get our Sprint user to receive SMS notifications. Is there something we are missing? I’ve tried the following:

pager = [ "1112223333@messaging.sprintpcs.com","1112223333@pm.sprint.com" ]

This works just fine for our T-Mobile users (using @tmomail.net). Any help is greatly appreciated.


as far as I know, only one pager number is supported. If you want to send 2 sms, you have to create a new user with the second pager number and assign the user to the notifications.

Thanks for the suggestion. I have also tried with only one number. Still no luck. It does work for multiple T-Mo numbers in my testing.

How does the notification command and script look like?

The Notification SMS portion looks like this:

 apply Notification "sms-icingaadmin" to Service {
     command = "notify-service-by-sms"
     users = [ "Tom_sms" ]
     assign where host.vars.notification.sms

What should I be looking for in scripts? Don’t see anything SMS related there.

Thank you,

I‘m interested in the parameter handling.

Here is sms-service-notification.sh:

sendsms() {
    templatesms=`cat <<TEMPLATE
    /usr/bin/printf "%b" "$templatesms" | mailx $USERPAGER

    if ! [[ $USERPAGER = "" ]] ; then

if [[ $SERVICESTATEID -eq 2 ]]; then sendsms
elif [[ $SERVICESTATEID -eq 0 ]] && [[ $SERVICEPREVIOUSSTATEID -eq 2 ]]; then sendsms


Ok, so the NotificationCommand populates the $USERPAGER environment variable, likely from $user.pager$. This can only be a single string containing one number.

If you want to page multiple numbers, need to

  • Create a second User object and assign the pager number to it.
  • Add this user to the notification apply rule inside the users array.
  • You may also want to create a UserGroup, add both users into it, and assign it to the notification apply rule via user_groups
object User "sms-pager1" {
  pager = "1..."
object User "sms-pager2" {
  pager = "2..."

object UserGroup "sms-pager" {
  assign where match("sms-pager*", user.name)

apply Notification "sms-notification" to Service {
  users_groups = [ "sms-pager" ]


Thanks. I have implemented this, testing and working with our T-Mo users. Still not working for the Sprint user. It may be that Sprint is blocked Email to SMS. We will have the user call Sprint and check if this feature is blocked.

Sprint is an email2sms gateway provider, right? Maybe they provide extended logging, or support to troubleshoot why those emails remain blocked. Could be a missing mail header or some authentication details.