Zabbix部署、监测及邮件报警机制(实战!)

Zabbix部署

实验环境:

CentOS 7-2:192.168.18.147(监测端:部署安装zabbix)

CentOS 7-3:192.168.18.128(被监测端)

监测端操作:

[[email protected] ~]# systemctl stop firewalld.service        #关闭防火墙功能
[[email protected] ~]# systemctl disable firewalld.service     #开机禁用防火墙功能
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[[email protected] ~]# setenforce 0                            #关闭增强型安全功能

`安装LAMP架构`
[[email protected] ~]# yum install -y httpd mariadb-server mariadb php php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mhash

`编辑apache配置文件`
[[email protected] ~]# vim /etc/httpd/conf/httpd.conf
95 ServerName www.yun.com:80                        #第95行,删除注释,域名自定义
164     DirectoryIndex index.html index.php         #164行,添加首页支持类类型index.php
#修改完成后按Esc退出插入模式,输入:wq保存退出

`修改时区为中国`
[[email protected] ~]# vim /etc/php.ini
878 date.timezone = PRC     #878行,把前面模板的;号删除,后面添加中国时区PRC
#修改完成后按Esc退出插入模式,输入:wq保存退出

[[email protected] ~]# systemctl start httpd.service       #启动apache服务
[[email protected] ~]# systemctl start mariadb.service     #启动mariadb服务
[[email protected] ~]# netstat -ntap | egrep ‘(3306|80)‘   #使用egrep命令同时查看3306和80端口
tcp        0      0 0.0.0.0:3306            0.0.0.0:*            LISTEN      4410/mysql
tcp6       0      0 :::80                   :::*                 LISTEN      4131/httpd
`初始化数据库配置`
[[email protected] ~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we‘ll need the current
password for the root user.  If you‘ve just installed MariaDB, and
you haven‘t set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):   #此处直接回车
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y      #设置密码
New password:       #abc123
Re-enter new password:      #确认输入:abc123
Password updated successfully!
Reloading privilege tables..
 ... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] n     #是否删除匿名用户,选择不删除
 ... skipping.
Normally, root should only be allowed to connect from ‘localhost‘.  This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y   #是否远程连接
 ... Success!
By default, MariaDB comes with a database named ‘test‘ that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] n      #是否删除测试数据库
 ... skipping.
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y    #是否重新加载
 ... Success!
Cleaning up...
All done!  If you‘ve completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!

#验证登录数据库
[[email protected] ~]# mysql -u root -p
Enter password:     #输入密码abc123
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 5.5.64-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

`创建zabbix数据库,并且设置为utf8形式,把里面的字符串转换为二进制`
MariaDB [(none)]> CREATE DATABASE zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
`提升用户`
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
| zabbix             |
+--------------------+
5 rows in set (0.00 sec)
#此时有zabbix数据库,需要创建管理里这个数据库的用户
MariaDB [(none)]> GRANT all privileges ON *.* TO ‘zabbix‘@‘%‘ IDENTIFIED BY ‘admin123‘;
Query OK, 0 rows affected (0.01 sec)
#把所有数据库和所有表都交给zabbix进行管理,并且设置密码为admin123

MariaDB [(none)]> flush privileges;     #刷新
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> quit      #退出数据库
Bye

`测试php基本信息`
[[email protected] ~]# cd /var/www/html/
[[email protected] html]# ls
[[email protected] html]# vim index.php
<?php
  phpinfo();
?>
此时在宿主机中输入:192.168.18.147,查看是否可以访问php页面:

测试是否能够连接数据库:
[[email protected] html]# vim index.php
#先按3dd删除原有内容,再插入以下内容
<?php
$link=mysql_connect(‘192.168.18.147‘,‘zabbix‘,‘admin123‘);
if($link) echo "<h1>Success!!</h1>";
else echo "Fail!!";
mysql_close();
?>
此时在宿主机中刷新之前的页面:192.168.18.147,如果可以访问mysql数据库则返回Success提示,如果不能则返回Fail提示:

解决问题:

如果出现Fail报错一般为本地无法登录得问题,可以使用以下方法解决
[[email protected] html]# mysql -u zabbix -p
Enter password:     #此时输入admin123无法登录数据库,说明有用户占用
ERROR 1045 (28000): Access denied for user ‘zabbix‘@‘localhost‘ (using password: YES)

`先使用root用户登录数据库`
[[email protected] html]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 15
Server version: 5.5.64-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

MariaDB [(none)]> select user,host from mysql.user;
+--------+-----------+
| user   | host      |
+--------+-----------+
| zabbix | %         |
| root   | 127.0.0.1 |
| root   | ::1       |
|        | cacti     |
|        | localhost |
| root   | localhost |
+--------+-----------+
6 rows in set (0.00 sec)

`以下操作删除空用户`
MariaDB [(none)]> drop user ‘‘@localhost;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> drop user ‘‘@cacti;
Query OK, 0 rows affected (0.00 sec)

`此时空用户被删除`
MariaDB [(none)]> select user,host from mysql.user;
+--------+-----------+
| user   | host      |
+--------+-----------+
| zabbix | %         |
| root   | 127.0.0.1 |
| root   | ::1       |
| root   | localhost |
+--------+-----------+
4 rows in set (0.00 sec)

MariaDB [(none)]> quit
Bye

`此时再次刷新页面就会显示Success!!成功登录`

部署Zabbix Server

[[email protected] html]# yum install php-bcmath php-mbstring -y
`安装zabbix源`
[[email protected] html]# rpm -ivh http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
获取http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
警告:/var/tmp/rpm-tmp.13QGZK: 头V4 RSA/SHA512 Signature, 密钥 ID a14fe591: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:zabbix-release-3.5-1.el7         ################################# [100%]

`查看源`
[[email protected] html]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# ls
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo    CentOS-Vault.repo
CentOS-CR.repo    CentOS-fasttrack.repo  CentOS-Sources.repo  zabbix.repo
[[email protected] yum.repos.d]# cat zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://repo.zabbix.com/zabbix/3.5/rhel/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://repo.zabbix.com/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1

[[email protected] yum.repos.d]# yum install zabbix-server-mysql zabbix-web-mysql -y
......此处省略多行
已安装:
  zabbix-server-mysql.x86_64 0:4.0.0-1.1rc3.el7    zabbix-web-mysql.noarch 0:4.0.0-1.1rc3.el7

作为依赖被安装:
  OpenIPMI.x86_64 0:2.0.27-1.el7                   OpenIPMI-libs.x86_64 0:2.0.27-1.el7
  OpenIPMI-modalias.x86_64 0:2.0.27-1.el7          fping.x86_64 0:3.10-1.el7
  iksemel.x86_64 0:1.4-2.el7.centos                zabbix-web.noarch 0:4.0.0-1.1rc3.el7

`生成数据库文件`
[[email protected] yum.repos.d]# zcat /usr/share/doc/zabbix-server-mysql-4.0.0/create.sql.gz | mysql -u zabbix -p  zabbix
Enter password:     #输入密码admin123

[[email protected] yum.repos.d]# grep -n ‘^‘[a-Z] /etc/zabbix/zabbix_server.conf
38:LogFile=/var/log/zabbix/zabbix_server.log
49:LogFileSize=0
72:PidFile=/var/run/zabbix/zabbix_server.pid
82:SocketDir=/var/run/zabbix
101:DBName=zabbix
117:DBUser=zabbix
357:SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
475:Timeout=4
518:AlertScriptsPath=/usr/lib/zabbix/alertscripts
529:ExternalScripts=/usr/lib/zabbix/externalscripts
565:LogSlowQueries=3000
#是配置文件中缺少的就是密码,其它得系统已自动配置

[[email protected] yum.repos.d]# vim /etc/zabbix/zabbix_server.conf
125 DBPassword=admin123     #125行删除注释,添加密码admin123在=号后面
#修改完成后按Esc退出插入模式,输入:wq保存退出

`修改时区`
[[email protected] yum.repos.d]# vim /etc/httpd/conf.d/zabbix.conf
20         php_value date.timezone Asia/Shanghai        #20行删除注释,失去改为Asia/Shanghai
#修改完成后按Esc退出插入模式,输入:wq保存退出

`修正图表中文乱码`
[[email protected] yum.repos.d]# vim /usr/share/zabbix/include/defines.inc.php
#输入以下内容进行全局字体替换为kaiti
:%s /graphfont/kaiti/g
#修改完成后按Esc退出插入模式,输入:wq保存退出

`复制STKAITI.TTF文件到字体目录下`
[[email protected] yum.repos.d]# mkdir /aaa        #创建挂载目录
[[email protected] yum.repos.d]# mount.cifs //192.168.0.105/rpm /aaa       #进行远程挂载
Password for [email protected]//192.168.0.105/rpm:
[[email protected] yum.repos.d]# cd /aaa/zabbix/
[[email protected] zabbix]# ls
php-bcmath-5.4.16-42.el7.x86_64.rpm    STKAITI.TTF
php-mbstring-5.4.16-42.el7.x86_64.rpm  zabbix.conf.php
[[email protected] zabbix]# cp STKAITI.TTF /usr/share/zabbix/fonts/

`启动服务查看端口开启情况`
[[email protected] zabbix]# systemctl enable zabbix-server
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-server.service to /usr/lib/systemd/system/zabbix-server.service.
[[email protected] zabbix]# systemctl start zabbix-server
[[email protected] zabbix]# netstat -ntap | grep zabbix        #监听端口为10051
tcp        0      0 0.0.0.0:10051           0.0.0.0:*        LISTEN    6735/zabbix_server
tcp6       0      0 :::10051                :::*             LISTEN    6735/zabbix_server
[[email protected] zabbix]# systemctl restart httpd.service    #重启httpd服务,用于验证登录zabbix

验证:登录操作,安装zabbix

第一步:在宿主机地址栏中输入:http://192.168.18.147/zabbix/可进入以下页面,按Next step进入下一步

第二步:确认检查全部为OK之后,按Next step进入下一步

第三步:数据库设置,输入端口号3306,填写密码admin123,按Next step进入下一步

第四步:填写zabbix服务名称,此处填写Zabbix(可自行定义),按Next step进入下一步

第五步:可以显示之前所有配置的内容,直接按Next step进入下一步

第六步:进入页面后直接按Finish结束,进入登陆界面,输入默认账户Admin,默认密码zabbix,点击登录

此时就可以进入到zabbix的监控界面了:

可点击右上角人物头像,在Language语言栏选择Chinese(zh_CN)简体中文,点击Update更新

以上就是监测端的所有操作!


被监测端操作:

[[email protected] ~]# systemctl stop firewalld.service
[[email protected] ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[[email protected] ~]# setenforce 0

`安装yum源`
[[email protected] ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
获取http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
警告:/var/tmp/rpm-tmp.elS5cl: 头V4 RSA/SHA512 Signature, 密钥 ID a14fe591: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:zabbix-release-3.5-1.el7         ################################# [100%]

[[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# ls
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo    CentOS-Vault.repo
CentOS-CR.repo    CentOS-fasttrack.repo  CentOS-Sources.repo  zabbix.repo
[[email protected] yum.repos.d]# yum install zabbix-agent -y

`修改配置文件`
[[email protected] yum.repos.d]# grep -n ‘^‘[a-Z] /etc/zabbix/zabbix_agentd.conf
13:PidFile=/var/run/zabbix/zabbix_agentd.pid
32:LogFile=/var/log/zabbix/zabbix_agentd.log
43:LogFileSize=0
98:Server=127.0.0.1             #此处需要修改为监控端IP
139:ServerActive=127.0.0.1      #此处需要修改为监控端IP
150:Hostname=Zabbix server
268:Include=/etc/zabbix/zabbix_agentd.d/*.conf

[[email protected] yum.repos.d]# vim /etc/zabbix/zabbix_agentd.conf
98 Server=192.168.18.147            #98行,指向监控服务器IP
139 ServerActive=192.168.18.147     #139行,指向监控服务器IP
150 Hostname=zhou                   #主机名,可自行定义
#修改完成后按Esc退出插入模式,输入:wq保存退出

`启动服务`
[[email protected] yum.repos.d]# systemctl enable zabbix-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent.service to /usr/lib/systemd/system/zabbix-agent.service.
[[email protected] yum.repos.d]# systemctl restart zabbix-agent.service
[[email protected] yum.repos.d]# netstat -ntap | grep zabbix       #监听端口为10050
tcp        0      0 0.0.0.0:10050           0.0.0.0:*         LISTEN   5425/zabbix_agentd
tcp6       0      0 :::10050                :::*              LISTEN   5425/zabbix_agentd

此时不会自动识别被监控端,需要做以下操作:

第一步:找到配置下的主机选项,点击创建主机

第二步:在主机配置界面填入相应内容,然后点击模板

第三步:在模板中选择HTTP和SSH的模板链接,点击提示器中的添加,然后再点击蓝色的添加图标

此时回到开始的界面就会显示新添加的监控项

以上就实现了服务器监控被监控端,假如被监控端遇到问题,就会触发报警,最终会以邮件形式提供(需要添加邮件发送服务)


Zabbix监测和报警机制

监控端安装邮件报警功能的操作
[[email protected] zabbix]# yum install mailx -y
[[email protected] zabbix]# vim /etc/mail.rc
#在末行下插入以下内容
set from=邮箱地址   #例如[email protected]
set smtp=smtp.163.com
set smtp-auth-user=邮箱地址
set smtp-auth-password=邮箱密码
set smtp-auth=login
#修改完成后按Esc退出插入模式,输入:wq保存退出

`尝试发送测试邮件`
[[email protected] zabbix]# echo "hello world" | mail -s "testmail" 邮箱地址
此时邮箱收到测试邮件:

编写发邮件脚本:

[[email protected] zabbix]# cd /usr/lib/zabbix/alertscripts
[[email protected] alertscripts]# vim mail.sh
#!/bin/bash
#send mail

messages=`echo $3 | tr ‘\r\n‘ ‘\n‘`
subject=`echo $2 | tr ‘\r\n‘ ‘\n‘`
echo "${messages}" | mail -s "${subject}" $1 >>/tmp/mailx.log 2>&1
#修改完成后按Esc退出插入模式,输入:wq保存退出

[[email protected] alertscripts]# mv mail.sh mailx.sh

`在tmp目录下创建mailx的日志文件`
[[email protected] alertscripts]# touch /tmp/mailx.log

`赋予权限`
[[email protected] alertscripts]# chown -R zabbix.zabbix  /tmp/mailx.log
[[email protected] alertscripts]# chmod +x /usr/lib/zabbix/alertscripts/mailx.sh
[[email protected] alertscripts]# chown -R zabbix.zabbix /usr/lib/zabbix/

`验证过程`
[[email protected] alertscripts]# ./mailx.sh 邮箱地址 "yun" "hello"
#其中邮箱地址为$1,yun为$2主题,hello为$3内容

此时执行完脚本,邮箱中就可以收到相对应的邮件了!

接下来进入Web界面进行设置:

第一步:在上方选择管理,找到其中的报警媒介类型,再点击页面右上角的创建媒体类型,在界面中输入相关信息

第二步:选项中会显示3次探测服务,如果宕掉就会触发报警,最后点击下方的蓝色添加图标,就可以生成新的报警类型了


接下来我们需要指定用户

第一步:找到配置中的用户界面,点击Admin用户

第二步:在用户的报警媒介中点击添加,输入相对应的媒介信息,最后点击添加

第三步:添加媒介之后一定不要忘记点击更新

在动作中删除原有模板,在进行重新定义,点击右上角的创建动作

第一步:在动作界面中输入名称,生成新的触发条件

第二步:在操作中做以下操作,下方点击新的,做添加操作,最后点击跟新

此时新的操作生成!

第三步:恢复操作中做以下填写

此时新的操作生成!

第四步:点击蓝色图标添加,此时就会进行持续性的监控了

查看被监控端SSH远程连接服务状态

[[email protected] yum.repos.d]# systemctl status sshd
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
   Active: active (running) since 一 2019-11-25 11:00:11 CST; 2 months 7 days ago
#此时显示为running运行状态

`停止此服务`
[[email protected] yum.repos.d]# systemctl stop sshd

此时我们看监控界面会不会跳出提示

经过等待几分钟之后监控界面会自动跳出SSH服务down的提示,此时邮箱也会收到邮件

`启动sshd服务`
[[email protected] yum.repos.d]# systemctl start sshd
此时几分钟过后会自动监测到服务成功开启,报警已解决,同时邮箱也会收到服务恢复的邮件

以上就是Zabbix监控的监测和报警机制

原文地址:https://blog.51cto.com/14464303/2468746

时间: 2024-08-03 20:33:54

Zabbix部署、监测及邮件报警机制(实战!)的相关文章

在LAMP架构中部署zabbix监控系统及邮件报警机制

初步了解zabbix: Zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题.是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案.被监控对象只要支持SNMP协议或者运行zabbix_agents代理程序即可.agent端:主机通过安装agent方式采集数据.server端:通过收集agent发送的数据,写入数据库(MySQL,ORACLE等),再通过php+apache在web前端展示. SNMP:

简单操作Zabbix安装配置与邮件报警(centos 7.4)

Zabbix官网下载地址:https://www.zabbix.com/download 实验拓扑:zabbix server端: 192.168.80.101 公网环境 centos 7.4 LAMP架构zabbix angent端: 192.168.80.102 公网环境 centos 7.4注:zabbix(音同 z?bix)是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案.zabbix由2部分构成,zabbix server与可选组件zabbix agent

监控软件Zabbix之配置QQ邮箱报警机制

上篇讲解了Zabbix的安装与配置,本篇继续讲解如何配置邮件报警机制:本篇我就在此前zabbix服务端和客户端都已经配置好的基础上进行试验:在监控主机上进行配置: 1.使用yum安装mailx邮箱服务: * yum install mailx -y 2.安装完后在末行加入以下配置: * vim /etc/mail.rc #注意网易,QQ邮箱需要开启客户端授权码进行第三方登录 set [email protected] set smtp=smtp.qq.com set [email protect

zabbix 3.0监控邮件报警

zabbix 3.0 监控邮件报警 1.在监控服务器的/usr/local/zabbix/bin创建发送邮件脚本  vim send.py #!/usr/bin/env python  # -*- coding: utf-8 -*-  #!/usr/bmport pdb  import smtplib import string import time import sys reload(sys) sys.setdefaultencoding('utf-8') #pdb.set_trace() 

zabbix自动注册及邮件报警

自动注册 自动注册,基于注册规则,匹配主机名,必须是客户端安装好agent,如果需要添加监控,需创建Actions动作 (1)打开Zabbix服务端,选择"配置"-"动作",事件源选择"自动注册",创建新的动作 (2)在"动作"配置项,添加新的触发条件为"主机名称非似 Linux":在"操作"配置项,创建新的操作:添加主机.添加到主机群组:Linux servers.链接到模板:Temp

zabbix 以html格式邮件报警

样板: #邮件报警脚本 #!/bin/sh export smtpemailfrom="Zabbix_monit[email protected]" export zabbixemailto="$1" export zabbixsubject="$2" export zabbixbody="$3" export smtpserver=mail.server.host #export smtplogin=SMTP_LOGIN #

zabbix 自定义参数及邮件报警

一. 自定义参数 在zabbix-agent主机上根据命令定义参数例:查看当前系统登录用户数uptime | awk -F " " '{print $5}' //根据shell命令查找出当前登录用户数vi /etc/zabbix/zabbix_agentd.d/testparam.conf //新建参数配置文件testparam.confUserParameter=login-user,uptime | awk -F " " '{print $5}' //在配置文件

zabbix 3.0.2邮件报警

sendEmail是一个轻量级,命令行的SMTP邮件客户端.如果你需要使用命令行发送邮件,那么sendEmail是非常完美的选择:使用简单并且功能强大.这个被设计用在php.bash perl和web站点使用. 请注意,不是sendmail.我第一次看到这个名字,直接yum install -y sendmail了 然后下面就蒙圈了. 下载软件 wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.

zabbix配置外网邮件报警

1. 基本条件 zabbix服务器端已经建立并且运行 zabbix客户端已经建立并且运行 2. 需要安装的软件包 编译安装msmtp包,yum安装mutt包 3. 配置过程 3.1 配置msmtp 下载并安装msmtp包 http://sourceforge.net/projects/msmtp/files/msmtp/1.6.2/ 安装msmtp tar jxvf msmtp-1.6.2.tar.bz2 cd msmtp-1.6.2 ./configure  make make install