1.环境概述
虚拟机系统:CentOS Linux release 7.3.1611 (Core)
宿主机系统:Mac Sierra version 10.12.3
nginx:1.10.3
php:7.1.2
mysql:5.7
zabbix:3.2.4
2.elasticsearch
a.下载
wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/zip/elasticsearch/2.4.4/elasticsearch-2.4.4.zip
unzip elasticsearch-2.4.4.zip
b.配置jmx
编辑 /root/elasticsearch-2.4.4/bin/elasticsearch
JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=192.168.56.101 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9100 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
jmx需要指定hostname,和CentOS的houstname保持一致,此处为192.168.56.101。
那么如何设置CentOS的hostname
即时生效:
hostname 192.168.56.101
永久生效:编辑/etc/hostname 为 192.168.56.101
c.启动
nohup elasticsearch-2.4.4/bin/elasticsearch &
d.配置zabbix_java
编辑 /usr/local/zabbix/etc/zabbix_server.conf
JavaGateWay:127.0.0.1 JavaGatewayPort=10052 StartJavaPollers=5
启动zabbix_java
/usr/local/zabbix/sbin/zabbix_java/startup.sh
重启zabbix_server(先杀进程再启动)
3.配置zabbix界面
设置Host tab页
添加jmx连接 192.168.56.101 9100即可