Prometheus+Grafana+redis_exporter 监控 Redis 服务
Prometheus Grafana DevOps 大约 1577 字redis_exporter 下载地址
https://github.com/oliver006/redis_exporter/releases
后台启动
nohup /root/exporter/redis_exporter-v1.33.0/redis_exporter > redis_exporter.out 2>&1 &
开机启动
编辑
vim /etc/systemd/system/redis_exporter.service
内容:ExecStart
需要修改为redis_exporter
二进制文件的绝对路径
[Unit]
Description=redis_exporter
Documentation=https://github.com/oliver006/redis_exporter
After=network.target
[Service]
Type=simple
User=root
ExecStart= /root/exporter/redis_exporter-v1.33.0/redis_exporter
Restart=on-failure
[Install]
WantedBy=multi-user.target
设为开机启动
sudo systemctl enable redis_exporter.service
启动redis_exporter
sudo systemctl start redis_exporter.service
redis_exporter 默认端口
修改 Prometheus 配置
prometheus.yml
文件中修改。
scrape_configs:
## config for the multiple Redis targets that the exporter will scrape
- job_name: 'redis_exporter_targets'
static_configs:
- targets:
- redis://192.168.0.100:6379
metrics_path: /scrape
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 192.168.0.100:9121
## config for scraping the exporter itself
- job_name: 'redis_exporter'
static_configs:
- targets:
- 192.168.0.100:9121
重启 Prometheus
重启后可查看redis_exporter
是否上线。
Grafana Dashboard
Redis Dashboard for Prometheus Redis Exporter 1.x:https://grafana.com/grafana/dashboards/763
开源地址
阅读 206 · 发布于 2022-02-24
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
数据结构:简化平衡二叉树旋转时节点交换的操作阅读 576
-
GoJS 更改 Overview 的拖动框颜色阅读 396
-
软考-系统架构设计师:性能评价方法阅读 1736
-
npm Hostname/IP does not match certificate's altnames阅读 1341
-
MySQL 内存占用过高阅读 1659
-
Java jdbc 批处理 rewriteBatchedStatements=true阅读 2070
-
设计模式之代理模式阅读 748
-
Tomcat 开启 gzip 压缩阅读 609
-
Java 中的锁 StampedLock阅读 763
-
Redis 使用 hash tag 插入到同一个哈希槽阅读 2389