Prometheus+Grafana+redis_exporter 监控 Redis 服务
Prometheus Grafana DevOps 评论 1 大约 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
开源地址
阅读 1250 · 发布于 2022-02-24
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
-
fHLvlxbf 1楼
e
Chrome | Windows 10 2023-07-24
随便看看
换一批
-
Spring Boot 3 使用 Spring Native 构建二进制可执行文件阅读 1222
-
PostgreSQL 数组中是否存在某个元素阅读 110
-
curl 不打印返回值信息阅读 527
-
Elasticsearch 监控运行状态阅读 2345
-
数据结构:队列-数组实现阅读 1410
-
Java 并发编程之 AQS ReentrantLock 非公平锁源码解析阅读 1742
-
Alpine Linux ll not found 解决方法阅读 1463
-
Java 命令行参数参考手册阅读 266
-
Linux 使用 nsenter 进入 Docker 容器排查问题阅读 1049
-
Keycloak 一直返回 401 验证不通过阅读 1116