Prometheus 监控 Redis

前言

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

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容