zabbix邮件报警设置

1.警报环境的搭建
[root@foundation44 3.4]# iptables -t nat -I POSTROUTING -s 172.25.44.0/24 -j MASQUERADE    #真机加伪装
[root@foundation44 3.4]# ping www.baidu.com  #ping通代表伪装添加成功
	PING www.baidu.com (183.232.231.172) 56(84) bytes of data.
	64 bytes from 183.232.231.172 (183.232.231.172): icmp_seq=1 ttl=53 time=115 ms
	64 bytes from 183.232.231.172 (183.232.231.172): icmp_seq=2 ttl=53 time=299 ms

# 测试虚拟机是否可以上网
[root@server1 zabbix]# route add default gw 172.25.44.250  # 虚拟机加真机网关
[root@server1 zabbix]# route -n   #查看网关
		Kernel IP routing table
		Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
		0.0.0.0         172.25.44.250   0.0.0.0         UG    0      0        0 eth0
		172.25.44.0     0.0.0.0         255.255.255.0   U     100    0        0 eth0
[root@server1 zabbix]# cat /etc/resolv.conf 
		# Generated by NetworkManager
		search example.com    
[root@server1 zabbix]# vim /etc/resolv.conf   # 添加解析
	  1 # Generated by NetworkManager
	  2 nameserver 114.114.114.114  
[root@server1 zabbix]# ping www.baidu.com
[root@test1 ~]# ping www.baidu.com
	PING www.a.shifen.com (180.149.132.151) 56(84) bytes of data.
	64 bytes from 180.149.132.151 (180.149.132.151): icmp_seq=1 ttl=52 time=72.5 ms
	64 bytes from 180.149.132.151 (180.149.132.151): icmp_seq=2 ttl=52 time=40.8 ms

浏览器添加应用:

在这里插入图片描述

[root@server1 zabbix]# vim /etc/zabbix/zabbix_server.conf      # 查看脚本路径
490 AlertScriptsPath=/usr/lib/zabbix/alertscripts
[root@server1 zabbix]# cd /usr/lib/zabbix/alertscripts/
[root@server1 alertscripts]# pwd
/usr/lib/zabbix/alertscripts
[root@server1 alertscripts]# ls
oneitsm_zabbix_release-1.2.0.tar.gz
[root@server1 bin]# ./install.sh 912bb306-1006-0c63-1388-e7bdace713f5
start to create config file...
Zabbix管理地址: http://172.25.44.11/zabbix 
Zabbix管理员账号: Admin
Zabbix管理员密码: 
start to auth by zabbix admin user and password...
	
create action success!
安装成功.

关闭其他警报媒介,只打开oneitsm media

这里写图片描述
这里写图片描述
这里写图片描述
这里写图片描述
这里写图片描述
这里写图片描述
这里写图片描述

点击Admin,添加报警媒介

这里写图片描述
这里写图片描述

[root@server2 zabbix_agentd.d]# /etc/init.d/zabbix-agent stop
			Shutting down Zabbix agent:                                [  OK  ]

# 关闭客户端zabbix-agent,就会出现报警

这里写图片描述
这里写图片描述

# 有报警,且发送邮件成功

这里写图片描述

解决问题:/etc/init.d/zabbix-agent start

# 警告显示已解决

这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值