下载Elastic Search-Exporter
https://github.com/justwatchcom/elasticsearch_exporter/releases
解压文件
tar -zxf -C /home elasticsearch_exporter-1.1.0.linux-amd64.tar.gz
到解压后的文件夹下
cd /home/elasticsearch_exporter-1.1.0.linux-amd64
启动
nohup ./elasticsearch_exporter --web.listen-address ":9021" --es.all --es.clusterinfo.interval=1m --es.timeout 10s --es.uri http://username:passwd@ip:port &
修改prometheus.yml并重启
- job_name: 'ElasticSearch'
metrics_path: '/metrics'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['ip:port']
labels:
service: skywalking-es
instance: ip