zabbix邮件告警

zabbix邮件告警

设置zabbix_server配置文件

vim /etc/zabbix/zabbix_server.conf
找到:AlertScriptsPath=/usr/lib/zabbix/alertscripts
cd /usr/lib/zabbix/alertscripts
把mail.py 挪到这个目录下来
给它一个执行权限 chmod +x mail.py

设置zabbixWEB UI

1 ) 设置报警媒介
Administration -> Media types -> 右上角(Create Media type)
Name: alert
Type: Script
Script name: mail.py
Script parameters -> Add {ALERT.SENDTO}/ Add {ALERT.SUBJECT}/Add {ALERT.MESSAGE}
Add
在这里插入图片描述
2)设置接收邮件地址
Administration -> Users -> Admin(或者新建用户)
Media -> Add
Type: alert
Send to: 邮箱地址,如 123456@qq.com //可以写多个
Add
Update
注意:Pemissions 一定要有 Read-write 权限

3)配置动作
Configuration -> Actions -> Create action
Name: send_mail
Operations
New
Send to Users -> Admin
Send only to -> alert
Conditions -> new -> Add
Add
Recovery operations
New
Send to Users -> Admin
Send only to -> alert
Add

Add
在这里插入图片描述

在这里插入图片描述

测试报警

Configuration -> Hosts -> Triggers
故意调整一个trigger
Monitoring -> Problems

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值