zoukankan      html  css  js  c++  java
  • zabbix验证微信

    在Zabbix服务端设置邮件报警,当被监控主机宕机或者达到触发器预设值时,会自动发送报警邮件到指定邮箱。

    具体操作:

    以下操作在Zabbix监控服务端进行

    备注:Zabbix监控服务端

    操作系统:CentOS

    主机名:zabbix.osyunwei.com

    邮件报警有两种情况:

    1、Zabbix服务端只是单纯的发送报警邮件到指定邮箱,发送报警邮件的这个邮箱账号是Zabbix服务端的本地邮箱账号(例如:root@localhost.localdomain),只能发送,不能接收外部邮件。

    2、使用一个可以在互联网上正常收发邮件的邮箱账号(例如:xxx@163.com),通过在Zabbix服务端中设置,使其能够发送报警邮件到指定邮箱。

    第一种:使用Zabbix服务端本地邮箱账号发送邮件

    一、安装sendmail或者postfix

    yum install sendmail #安装

    service sendmail start #启动

    chkconfig sendmail on #设置开机启动

    yum install postfix

    service postfix start

    chkconfig postfix on

    CentOS 5.x 默认已经安装好sendmail

    CentOS 6.x 默认已经安装好postfix

    sendmail和postfix只需要安装一个即可并开启服务即可。

    二、安装邮件发送工具mailx

    yum install mailx #安装

    CentOS 5.x 编译安装mailx,直接yum安装的mailx版本太旧,使用外部邮件发送会有问题。

    yum remove mailx #卸载系统自带的旧版mailx

    下载mailx:

    http://nchc.dl.sourceforge.net/project/heirloom/heirloom-mailx/12.4/mailx-12.4.tar.bz2

    tar jxvf mailx-12.4.tar.bz2 #解压

    cd mailx-12.4 #进入目录

    make #编译

    make install UCBINSTALL=/usr/bin/install #安装

    ln -s /usr/local/bin/mailx /bin/mail #创建mailx到mail的软连接

    ln -s /etc/nail.rc /etc/mail.rc #创建mailx配置文件软连接

    whereis mailx #查看安装路径

    mailx -V #查看版本信息

    echo "zabbix test mail" |mail -s "zabbix" xxx@163.com

    #测试发送邮件,标题zabbix,邮件内容:zabbix test mail,发送到的邮箱:xxx@163.com

    三、配置Zabbix服务端邮件报警

    1、打开Zabbix

    系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链

    管理-示警媒介类型-Email

  • 相关阅读:
    第五次作业
    第四次作业
    第三次
    request.getAttribute()和 request.getParameter()有何区别
    .Servlet API中forward()与redirect()的区别
    jsp和servlet的区别、共同点、各自应用的范围
    Servlet的生命周期
    如何从CDN加载jQuery
    window.onload()函数和jQuery中的document.ready()的区别
    jquery中$.get()提交和$.post()提交的区别
  • 原文地址:https://www.cnblogs.com/momenglin/p/10265853.html
Copyright © 2011-2022 走看看