zabbix Server 4.0 报警(Action)篇
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
一.查看zabbix默认的Actions
1>.点击默认的Actions如:“Report problems to Zabbix administrators”
2>.定义条件表达式的Actions界面(定义我们要执行的操作)
3>.Operations界面功能说明(一般是触发事件时需要发送告警信息内容)
4>.Recovery operations界面功能说明(一般用于告警恢复时定义发送的内容)
5>.Update operations(确认操作,一般表示用于总结此次故障原因之类的信息)
二.部署zabbix内部的服务器
1>.
2>.
3>.
安装邮件服务器
[root@node101.yinzhengjie.org.cn ~]# yum -y install postfix
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 3.5 kB ::
* base: mirrors.aliyun.com
* epel: mirror.premi.st
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB ::
epel | 4.7 kB ::
extras | 3.4 kB ::
mysql-connectors-community | 2.5 kB ::
mysql-tools-community | 2.5 kB ::
mysql56-community | 2.5 kB ::
updates | 3.4 kB ::
zabbix | 2.9 kB ::
zabbix-non-supported | B ::
(/): epel/x86_64/updateinfo | kB ::
(/): epel/x86_64/primary_db | 6.7 MB ::
Package :postfix-2.10.-.el7.x86_64 already installed and latest version
Nothing to do
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# yum -y install postfix
4>.
安装mainx命令
[root@node101.yinzhengjie.org.cn ~]# yum -y install mailx
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 6.1 kB ::
* base: mirrors.aliyun.com
* epel: ftp.jaist.ac.jp
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB ::
epel | 4.7 kB ::
extras | 3.4 kB ::
mysql-connectors-community | 2.5 kB ::
mysql-tools-community | 2.5 kB ::
mysql56-community | 2.5 kB ::
updates | 3.4 kB ::
zabbix | 2.9 kB ::
zabbix-non-supported | B ::
(/): mysql-connectors-community/x86_64/primary_db | kB ::
(/): epel/x86_64/updateinfo | kB ::
(/): epel/x86_64/primary_db | 6.7 MB ::
Resolving Dependencies
--> Running transaction check
---> Package mailx.x86_64 :12.5-.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved======================================================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================================================
Installing:
mailx x86_64 12.5-.el7 base kTransaction Summary
======================================================================================================================================================================================
Install PackageTotal download size: k
Installed size: k
Downloading packages:
mailx-12.5-.el7.x86_64.rpm | kB ::
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mailx-12.5-.el7.x86_64 /
Verifying : mailx-12.5-.el7.x86_64 / Installed:
mailx.x86_64 :12.5-.el7 Complete!
[root@node101.yinzhengjie.org.cn ~]#
[root@node101.yinzhengjie.org.cn ~]# yum -y install mailx
三.自定义媒介
1>.点击“Create media type”
2>.媒介类型我们选择脚本(Script),这种方式一般用于测试微信告警。
3>.
4>.
5>.
三.
四.