当前位置: 首页 > news >正文

【prometheus-operator】k8s监控集群外redis

1、部署exporter

GitHub - oliver006/redis_exporter: Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x, 4.x, 5.x, 6.x, and 7.x

redis_exporter-v1.57.0.linux-386.tar.gz

# 解压

tar -zxvf redis_exporter-v1.57.0.linux-386.tar.gz

# 启动
nohup ./redis_exporter -redis.password 111111 -web.listen-address 0.0.0.0:9122 &

访问确认启动成功

http://ip:9122/metrics 

2、创建k8s对象

集群内部创建Endpoints代理外部端点

---
apiVersion: v1
kind: Service
metadata:name: redis-exporter-monitornamespace: monitorlabels:app: redis-exporter-monitor
spec:type: ClusterIPports:- name: tcp-9122port: 9122protocol: TCPtargetPort: 9122
---
apiVersion: v1
kind: Endpoints
metadata:name: redis-exporter-monitornamespace: monitorlabels:app: redis-exporter-monitorside: mid
subsets:
- addresses:- ip: {ip}ports:- name: tcp-9122port: 9122
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:name: redis-exporter-monitornamespace: monitorlabels:team: hitside: mid
spec:selector:matchLabels:app: redis-exporter-monitornamespaceSelector:matchNames:- monitorendpoints:- port: tcp-9122path: /metrics

3、grafana模板

id:17507

 关联文章:

【prometheus-operator】k8s监控集群redis

以上内容对您有帮助,请点赞支持,谢谢!

http://www.lryc.cn/news/326311.html

相关文章:

  • MySQL索引(图文并茂)
  • Redis 教程系列之Redis PHP 使用 Redis(十二)
  • JavaScript语法和数据类型
  • 解决华为云服务器宝塔面板无法访问显示“此站点的连接不安全”问题
  • 【Python】 Python脚本实现某平台视频流下载
  • LangChain核心模块 Model I/O——Prompts
  • 关于Docker守护程序未运行导致的错误
  • Unity中关于SendMessage方法
  • C++ 修饰符类型
  • 生产计划数据模型,实现能源企业数字化高效管理
  • 【chemistry 2】蛋白质的共价结构
  • 什么是 UI ?设计师为你解答
  • pytest框架入门及环境配置
  • unity 2d范围检测:怪物检测范围
  • 外包干了10天,技术倒退明显
  • 后端常问面经之Java基础
  • I.MX6ULL_Linux_驱动篇(58)linux IIO驱动
  • 两个包装类型变量的比较问题
  • Qt/C++通用跨平台Onvif工具/支持海康大华宇视华为天地伟业等/云台控制/预置位管理/工程调试利器
  • js 在for循环中有setTimeout 时,不执行等待,解决方法
  • 机械硬盘与固态硬盘的区别
  • Springboot总结
  • P8623 [蓝桥杯 2015 省 B] 移动距离 Python
  • 【Python】学习率调整策略详解和示例
  • 【Linux实践室】Linux用户管理实战指南:用户密码管理操作详解
  • UE5学习日记——蓝图节点前缀关键字整理
  • 浅析机器学习的常用方法
  • 大数据开发(日志离线分析项目)
  • PostgreSQL技术大讲堂 - 第48讲:PG高可用实现keepalived
  • 【若依 SpringBoot 前后端分离版】修改加密传输后密码错误的解决方法(附排错过程)