如何配置 icinga/nagios 以通过短信发出警报?

ckl*_*orn 6 nagios alerts icinga

我知道我的手机提供商的短信网关,所以我可以向它发送电子邮件。

我正在寻找contacts.cfg 和commands.cfg 中特定于移动设备的条目示例。

小智 2

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
}
Run Code Online (Sandbox Code Playgroud)

并且在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
}
Run Code Online (Sandbox Code Playgroud)