redis-集成prometheus监控(k8s)

一. 简介: 

   关于redis的简介和部署,可以参考单独的文章redis-sentinel基础概念及部署-优快云博客,这里就不细说了。这里只讲讲如何在k8s中部署export并基于prometheus做redis的指标采集。

二. 实现方式:

    首先我们需要先部署exporter采集器,提供给prometheus调用 ,这里我们选择在k8s中部署,好处是: k8s有健康检测机制,不需要独立维护exporter的故障问题。这里采用deployment的方式:

# Source: prometheus-redis-exporter/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis-exporter
  namespace: monitoring
  labels:
    app.kubernetes.io/name: redis-exporter
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: redis-exporter
  template:
    metadata:
      labels:
        app.kubernetes.io/name: redis-exporter
    spec:
      serviceAccountName: default
      securityContext:
        {}
      containers:
        - name: redisn-exporter
          securityContext:
      
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值