1、编辑配置文件
vim /etc/nagios/objects/contacts.cfg
增加如下内容:
define contactgroup{
contactgroup_name admins
alias Nagios Administraators
members nagiosadmin,dd
}
define contact{
contact_name 123
use generic-contact
alias dd
email 800000000@qq.com
}
define contact{
contact_name 456
use generic-contact
alias tt
email 1333333456@qq.com
}
define contactgroup{
contactgroup_name common
alias common
members 123,456
}
2、让谁告警,在/etc/nagios/conf.d/192.168.81.132.cfg
中指定邮件告警的服务。
如: 将contact_groups common加入check_load中
3、(2)中可以加上的参数:
notification_enabled 0/1是否开启提醒功能
notification_period 24x7 表示发送提醒的上班时间
非常重要的主机(服务)定义为24X7
一般的主机(服务)定义为上班时间
notification_options w,u,c,r 表示service 的状态。
4、编辑完文件重启nagios服务。service nagios restart

相关文章:

  • 2022-03-01
  • 2021-08-26
  • 2021-10-08
  • 2022-12-23
  • 2021-06-27
  • 2021-06-20
  • 2021-06-13
猜你喜欢
  • 2021-10-06
  • 2022-12-23
  • 2021-05-15
  • 2021-12-02
  • 2021-11-15
  • 2021-12-13
  • 2021-12-21
相关资源
相似解决方案