How to configure icinga/nagios to alert via sms

alertsicinganagios

I know the sms gateway for my cell phone provider so I can just send an email to it.

I am looking for examples of entries in contacts.cfg and commands.cfg that are mobile specific.

Best Answer

In contacts_nagios2.cfg:

define contactgroup{
        contactgroup_name       admins
        alias                   Nagios Administrators
        members                 user
}
define contact{
        contact_name                    name
        alias                           name
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,r
        service_notification_commands   notify-by-sms
        host_notification_commands      host-notify-by-sms
        email                           mail
        pager                          MOBILENUMBER
}

And in commands.cfg

define command{
       command_name notify-by-sms
       command_line script-to-sms-service
}
define command{
       command_name host-notify-by-sms
       command_line script-to-sms-service
}
Related Topic