|
Zabbix历史数据存储到ES
第1章 环境说明:
[root@ops-tmp-app-2 ~]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
[root@ops-tmp-app-2 ~]# systemctl status firewalld.service
●firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
[root@ops-tmp-app-2 ~]# getenforce
Disabled
Zabbix版本
[root@ops-tmp-app-2 ~]# rpm -qa|grep zabbix
zabbix-release-4.0-1.el7.noarch
ES版本,官方说明支持的ES版本为5.0-6.1之间,之前安装的6.2最后会不成功
[root@ops-test-yuyao-1 elasticsearch]# curl http://127.0.0.1:9200
{
"name" : "2nrv98N",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "oyVYItFuTIuEMgagxaOzgg",
"version" : {
"number" : "5.6.6",
"build_hash" : "7d99d36",
"build_date" : "2018-01-09T23:55:47.880Z",
"build_snapshot" : false,
"lucene_version" : "6.6.1"
},
"tagline" : "You Know, for Search"
}
第2章 zabbix服务端配置
2.1修改zabbix-server配置文件,用于将zabbix-server数据库中的数值类型和文本类型的历史数据存储到ES中
[root@ops-tmp-app-2 zabbix]# cat zabbix_server.conf
HistoryStorageURL=http://your-elasticsearch.here:9200
HistoryStorageTypes=str,log,text
2.2修改zabbix前端配置文件,用于将文本,字符,日志类型的历史数据存储到ES
中
[root@ops-tmp-app-2 zabbix]# cat web/zabbix.conf.php |
|
|