一.注册睿象云账号并创建应用(这里选择免费版,只能集成一个)
集成选择zabbix
二.安装agent(获取安装包,解压并安装)
[root@server1 ~]# ls
ca_zabbix_release-2.1.0.tar.gz
[root@server1 ~]# tar zxf ca_zabbix_release-2.1.0.tar.gz -C /usr/lib/zabbix/alertscripts/
[root@server1 ~]# cd /usr/lib/zabbix/alertscripts/cloudalert/bin/
[root@server1 bin]# ls
alert.sh install.sh log.sh update.sh
##install后接创建应用后产生的appkey
[root@server1 bin]# ./install.sh 2e782263-982d-4a15-90fd-7d828812927a
./log.sh: line 6: /usr/lib/zabbix/alertscripts/cloudalert/bin/cloudalert.conf: No such file or directory
start to create config file...
Zabbix管理地址: http://172.25.13.1/zabbix
Zabbix访问失败,请重新输入.
Zabbix管理地址: http://172.25.13.1/zabbix
Zabbix管理员账号: Admin
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 252 100 127 100 125 2136 2102 --:--:-- --:--:-- --:--:-- 2152
认证失败,请重新输入.
Zabbix管理员账号: Admin
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 1123 2005 --:--:-- --:--:-- --:--:-- 2016
auth success!
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 110 100 42 100 68 867 1404 --:--:-- --:--:-- --:--:-- 1416
start to create mediatype...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 362 100 56 100 306 911 4983 --:--:-- --:--:-- --:--:-- 5016
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 217 100 54 100 163 888 2682 --:--:-- --:--:-- --:--:-- 2716
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 635 100 51 100 584 809 9273 --:--:-- --:--:-- --:--:-- 9419
create user success!
start to create action...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2016 100 51 100 1965 663 25563 --:--:-- --:--:-- --:--:-- 25855
create action success!
安装成功.
三.zabbix中禁用其他报警媒介和动作
四.睿象云中创建通知策略(绑定手机微信,告警通知发送到微信)
五.测试
1.关闭server3上的agent
[root@server3 ~]# systemctl stop zabbix-agent
2.查看zabbix监控
3.手机收到告警通知并认领
4.处理告警
[root@server3 ~]# systemctl start zabbix-agent
5.手机收到告警关闭通知