mrbear 发表于 2019-1-16 09:59:40

nagios监控配置详解一联系人

  ###############################################################################
# contacts.cfg
###############################################################################
  ###############################################################################
###############################################################################
# CONTACTS 定义联系人名称(可以包含多个联系人)
#如果定义多个类型的联系人,添加多个define contact{}即可。针对多级告警
###############################################################################
###############################################################################
  # In this simple config file, a single contact will receive all alerts.
  define contact{
      contact_name             jiankong //名称
      alias                           jiankong //别名
      service_notification_period   24x7//服务告警时间段的名称
      host_notification_period      24x7//主机告警时间段的名称
#w-warning警告,u-unknown未知,c-critical宕机,r-recovery恢复
service_notification_options    w,u,c,r//服务告警状态
#d-down宕机,u-unknown未知,r-recovery恢复
      host_notification_options       d,u,r//主机告警状态
      service_notification_commands   notify-service-by-email//服务告警执行命令
      host_notification_commands      notify-host-by-email//主机告警执行命令
      email                           iwo@139.com,test@test.com //联系人,添加多个用逗号隔开
      }
  ###############################################################################
###############################################################################
#
# CONTACT GROUPS定义联系人权限。默认为系统管理员,也可以添加BOSS。
#
###############################################################################
###############################################################################
  # We only have one contact in this simple configuration file, so there is
# no need to create more than one contact group.
  define contactgroup{
      contactgroup_name       admins
      alias                   Nagios Administrators
      members               jiankong
      }




页: [1]
查看完整版本: nagios监控配置详解一联系人