1.注册账号:
配置
#切换到zabbix脚本目录
[root@c7-45 ~]# cd /usr/lib/zabbix/alertscripts
[root@c7-45 alertscripts]# ls
mail.sh
#获取cloud Alert Agent包
[root@c7-45 alertscripts]# wget https://download.aiops.com/ca_agent/zabbix/ca_zabbix_release-2.1.0.tar.gz
--2020-05-15 08:43:52-- https://download.aiops.com/ca_agent/zabbix/ca_zabbix_release-2.1.0.tar.gz
Resolving download.aiops.com (download.aiops.com)... 39.96.131.192
Connecting to download.aiops.com (download.aiops.com)|39.96.131.192|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3503 (3.4K) [text/plain]
Saving to: ‘ca_zabbix_release-2.1.0.tar.gz’
100%[====================================================================>] 3,503 --.-K/s in 0s
2020-05-15 08:43:52 (1.28 GB/s) - ‘ca_zabbix_release-2.1.0.tar.gz’ saved [3503/3503]
[root@c7-45 alertscripts]# ls
ca_zabbix_release-2.1.0.tar.gz mail.sh
#解压安装
[root@c7-45 alertscripts]# tar zxf ca_zabbix_release-2.1.0.tar.gz
[root@c7-45 alertscripts]# cd cloudalert/
[root@c7-45 cloudalert]# cd bin/
[root@c7-45 bin]# ls
alert.sh install.sh log.sh update.sh
[root@c7-45 bin]# bash install.sh 27f68461-ac2a-fd54-683d-ce7ad320ce97
./log.sh: line 6: /usr/lib/zabbix/alertscripts/cloudalert/bin/cloudalert.conf: No such file or directory
start to create config file...
Zabbix管理地址: 10.0.0.45/zabbix
Zabbix管理员账号: Admin
Zabbix管理员密码: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 2451 4377 --:--:-- --:--:-- --:--:-- 4464
auth success!
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 109 100 41 100 68 1782 2956 --:--:-- --:--:-- --:--:-- 3090
start to create mediatype...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 399 100 57 100 342 1699 10197 --:--:-- --:--:-- --:--:-- 10363
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 1675 5058 --:--:-- --:--:-- --:--:-- 5093
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 636 100 51 100 585 1612 18500 --:--:-- --:--:-- --:--:-- 18870
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 1394 53745 --:--:-- --:--:-- --:--:-- 54583
create action success!
安装成功.
设置分派策略
设置通知策略
测试
#关闭所有tomcat
supervisor> stop all
tomcat2: stopped
tomcat1: stopped
错误
#查看日志
[root@c7-45 bin]# cd /usr/lib/zabbix/alertscripts
[root@c7-45 alertscripts]# ls
ca_zabbix_release-2.1.0.tar.gz cloudalert mail.sh
[root@c7-45 alertscripts]# cd cloudalert/logs/
[root@c7-45 logs]# tail -f cloudalert.log