zoukankan      html  css  js  c++  java
  • nagios配置邮件告警

    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

  • 相关阅读:
    数组
    Spring创建对象的三种方式以及创建时间
    Struts文件上传下载
    自定义拦截器
    Struts过滤器
    mybatis整合ehcache
    mybatis主键返回
    shell脚本 列出所有网卡的ip地址
    Servlet执行过程
    centos时区
  • 原文地址:https://www.cnblogs.com/ddgen/p/7130244.html
Copyright © 2011-2022 走看看