在真机添加策略:

[root@foundation38 Desktop]# iptables -t nat -I POSTROUTING -s 172.25.38.0/24 -j MASQUERADE

利用Zabbix部署onealert云告警平台_java


在企业7的主机进行配置:

[root@localhost zabbix]# ls
web zabbix_java_gateway.conf zabbix_server.conf
zabbix_agentd.conf zabbix_java_gateway_logback.xml
zabbix_agentd.d zabbix_proxy.conf
[root@localhost zabbix]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.25.0.0 0.0.0.0 255.255.0.0 U 100 0 0 eth0
[root@localhost zabbix]# route add default gw 172.25.38.250 添加网关
[root@localhost zabbix]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 172.25.38.250 0.0.0.0 UG 0 0 0 eth0
172.25.0.0 0.0.0.0 255.255.0.0 U 100 0 0 eth0
[root@localhost zabbix]# vim /etc/resolv.conf
[root@localhost zabbix]# cat /etc/resolv.conf
nameserver 114.114.114.114
[root@localhost zabbix]# ping baidu.com 必须保证可以上网
PING baidu.com (220.181.57.216) 56(84) bytes of data.
64 bytes from 220.181.57.216 (220.181.57.216): icmp_seq=1 ttl=48 time=119 ms
64 bytes from 220.181.57.216 (220.181.57.216): icmp_seq=2 ttl=48 time=368 ms
^C
--- baidu.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 119.696/244.046/368.397/124.351 ms
[root@localhost zabbix]#

利用Zabbix部署onealert云告警平台_vim_02


在网页操作先开始注册oneAlert云告警平台并添加应用生成KEY:

利用Zabbix部署onealert云告警平台_Time_03


利用Zabbix部署onealert云告警平台_Time_04


利用Zabbix部署onealert云告警平台_vim_05


利用Zabbix部署onealert云告警平台_vim_06

[root@localhost zabbix]# vim /etc/zabbix/zabbix_server.conf 
[root@localhost zabbix]# cd /usr/lib/zabbix/alertscripts/
[root@localhost alertscripts]# ls
oneitsm_zabbix_release-1.2.0.tar.gz
[root@localhost alertscripts]# tar zxf oneitsm_zabbix_release-1.2.0.tar.gz
[root@localhost alertscripts]# ls
oneitsm oneitsm_zabbix_release-1.2.0.tar.gz
[root@localhost alertscripts]# cd oneitsm
[root@localhost oneitsm]# ls
bin logs release update
[root@localhost oneitsm]# cd bin/
[root@localhost bin]# ls
alert.sh install.sh log.sh update.sh

利用Zabbix部署onealert云告警平台_java_07

[root@localhost bin]# ./install.sh  08619cba-b2f6-d2f9-cd25-ec20c34a9b86
./log.sh: line 6: /usr/lib/zabbix/alertscripts/oneitsm/bin/oneitsm.conf: No such file or directory
start to create config file...
Zabbix管理地址: 172.25.38.11/zabbix
Zabbix管理员账号: Admin
Zabbix管理员密码: westos就是登陆zabbix的密码
start to auth by zabbix admin user and password...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 195 100 70 100 125 764 1364 --:--:-- --:--:-- --:--:-- 1373
auth success!
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 109 100 41 100 68 770 1277 --:--:-- --:--:-- --:--:-- 1283
start to create mediatype...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 356 100 56 100 300 500 2682 --:--:-- --:--:-- --:--:-- 2702
create media type success!
start to create user group...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 214 100 54 100 160 762 2259 --:--:-- --:--:-- --:--:-- 2285
create user group success!
start to create user in zabbix...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 623 100 51 100 572 725 8134 --:--:-- --:--:-- --:--:-- 8056
create user success!
start to create action...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2013 100 51 100 1962 351 13534 --:--:-- --:--:-- --:--:-- 13625
create action success!
安装成功:

利用Zabbix部署onealert云告警平台_vim_08


在网页进行部署添加媒介:

利用Zabbix部署onealert云告警平台_vim_09


利用Zabbix部署onealert云告警平台_java_10


利用Zabbix部署onealert云告警平台_Time_11


利用Zabbix部署onealert云告警平台_vim_12


利用Zabbix部署onealert云告警平台_java_13


利用Zabbix部署onealert云告警平台_vim_14


利用Zabbix部署onealert云告警平台_java_15


在企业6主机停止zabbix-agent模拟报警:

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

利用Zabbix部署onealert云告警平台_Time_16


在网页查看会有报警信息:

利用Zabbix部署onealert云告警平台_vim_17


利用Zabbix部署onealert云告警平台_vim_18


利用Zabbix部署onealert云告警平台_java_19


会给你绑定的邮箱发消息:

利用Zabbix部署onealert云告警平台_vim_20


在OneAlert会有待处理信息认领之后就会变成处理中:

利用Zabbix部署onealert云告警平台_vim_21


利用Zabbix部署onealert云告警平台_vim_22


server3再次打开服务:

[root@server3 bin]# /etc/init.d/zabbix-agent start
Starting Zabbix agent: [ OK ]
[root@server3 bin]#

利用Zabbix部署onealert云告警平台_vim_23


刷新ONeAlert会跑到已关闭邮件:

利用Zabbix部署onealert云告警平台_vim_24


手机邮箱会出来信息显示已经处理:

利用Zabbix部署onealert云告警平台_java_25


进行监控项的更新:

利用Zabbix部署onealert云告警平台_java_26


利用Zabbix部署onealert云告警平台_vim_27


利用Zabbix部署onealert云告警平台_Time_28


利用Zabbix部署onealert云告警平台_Time_29


利用Zabbix部署onealert云告警平台_Time_30


利用Zabbix部署onealert云告警平台_java_31


利用Zabbix部署onealert云告警平台_Time_32


利用Zabbix部署onealert云告警平台_java_33