Prometheus + Grafana(八)系统监控之Elasticsearch

 

前言

本文主要介绍如何使用Grafana和Prometheus以及elasticsearch_exporter对Elasticsearch性能进行监控。

1.安装elasticsearch_exporter

1.1.下载

下载地址:https://github.com/justwatchcom/elasticsearch_exporter/releases

1.2.上传解压

上传elasticsearch_exporter-1.1.0.linux-amd64.tar.gz安装包并解压到/usr/local目录

tar -xvf elasticsearch_exporter-1.1.0.linux-amd64.tar.gz
cd elasticsearch_exporter-1.1.0.linux-amd64/

1.3.启动

  • 进入根目录下,输入以下命令:
nohup ./elasticsearch_exporter --es.uri http://10.0.101.100:9200 &

注:--es.uri 指定的是es的服务地址。

  • 输入以下命令查看日志是否启动成功:
tail -1000f nohup.out

2.Prometheus配置

2.1.配置

修改prometheus组件的prometheus.yml加入elasticsearch节点:

2.2.启动验证

保存以后重启Prometheus,查看targets:

 注:State=UP,说明成功

3.Grafana配置

3.1.下载仪表盘

下载地址:https://grafana.com/grafana/dashboards/2322

3.2.导入仪表盘

3.3.查看仪表盘

猜你喜欢

转载自www.cnblogs.com/caoweixiong/p/12156590.html