Prometheus+Grafana+elasticsearch_exporter 监控 Elasticsearch
Prometheus Grafana DevOps 评论 1 大约 1411 字下载 elasticsearch_exporter
https://github.com/prometheus/elasticsearch_exporter/releases
后台启动
nohup /root/exporter/elasticsearch_exporter-1.3.0/elasticsearch_exporter > elasticsearch_exporter.out 2>&1 &
设置开机启动
编辑
vim /etc/systemd/system/elasticsearch_exporter.service
内容:ExecStart
需要修改为elasticsearch_exporter
二进制文件的绝对路径
[Unit]
Description=elasticsearch_exporter
Documentation=https://github.com/prometheus-community/elasticsearch_exporter
After=network.target
[Service]
Type=simple
User=root
ExecStart= /root/exporter/elasticsearch_exporter-1.3.0/elasticsearch_exporter
Restart=on-failure
[Install]
WantedBy=multi-user.target
设为开机启动
sudo systemctl enable elasticsearch_exporter.service
启动elasticsearch_exporter
sudo systemctl start elasticsearch_exporter.service
elasticsearch_exporter 默认端口
修改 Prometheus 配置
scrape_configs
下新增job_name
为elasticsearch
(名称随意)
- job_name: 'elasticsearch'
static_configs:
- targets: ['192.168.0.100:9114']
完整的scrape_configs
如下
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: 'elasticsearch'
static_configs:
- targets: ['192.168.0.100:9114']
重启 Prometheus
重启后可查看elasticsearch_exporter
是否上线。
Grafana Dashboard
ElasticSearch: https://grafana.com/grafana/dashboards/6483
开源地址
https://github.com/prometheus-community/elasticsearch_exporter
阅读 1700 · 发布于 2022-02-28
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓
昵称:
-
fHLvlxbf 1楼
e
Chrome | Windows 10 2023-07-24
随便看看
换一批
-
Docker 容器相关命令阅读 1118
-
minikube 与本地机器之间传递文件阅读 915
-
OpenLens 6.3.0 无法查案日志和进入 Pod Shell 解决方法阅读 2313
-
Windows 平台 lua-resty-upload 上传的文件无法打开阅读 2187
-
Java 并发编程之 happens-before 7 条规则阅读 1452
-
Linux 之安装 Maven阅读 2125
-
移动端使用 Chrome 开发者工具调试网页阅读 2731
-
Docker 部署 Prometheus阅读 2895
-
Java 多级目录的文件夹拷贝阅读 1103
-
Windows 子系统设置默认 root 用户登录阅读 1543