Nagios

如何配置 icinga/nagios 以通過簡訊提醒?

  • April 1, 2017

我知道我的手機提供商的簡訊網關,所以我可以向它發送電子郵件。

我正在尋找特定於移動設備的 contacts.cfg 和 commands.cfg 中的條目範例。

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
}

而在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
}

引用自:https://serverfault.com/questions/353977