Prometheus 监控 Redis

2019-03-26 19:23:19 +08:00
 wsgzao

前言

Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x, 4.x, and 5.x

Prometheus 监控 Redis

更新历史

2019 年 03 月 23 日 - 初稿

阅读原文 - https://wsgzao.github.io/post/prometheus-redis/

扩展阅读

redis_exporter - https://github.com/oliver006/redis_exporter


Redis export 安装和使用

# 下载 redis_exporter
https://github.com/oliver006/redis_exporter/releases
cd /tmp
wget https://github.com/oliver006/redis_exporter/releases/download/v0.30.0/redis_exporter-v0.30.0.linux-amd64.tar.gz 
tar xf redis_exporter-v0.30.0.linux-amd64.tar.gz

# 后台启动 redis_exporter
nohup ./redis_exporter -redis.addr redis://<IP>:<PORT> &

# iptables rule for Prometheus Redis 
-A INPUT -s xxx -p tcp --dport 9121 -j ACCEPT

# 测试 URL 获取 metrics
curl http://<IP>:9121/metrics

Grafana

Memory Usage 中 redis_config_maxmemory 如果无法获取到数据请自行定义 value

https://grafana.com/dashboards/763

参考文献

https://prometheus.io/docs/instrumenting/exporters/#databases

1602 次点击
所在节点    程序员
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/548865

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX