使用metricbeat监控redis服务状态

本文介绍了如何在ELK系统部署完成后,安装并配置Metricbeat来监控Redis服务的状态,包括修改配置文件以连接到特定主机、启用redis模块、设置监控周期,以及添加索引以便在Kibana中展示数据。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

redis服务状态监控

基础环境

  1. ELK系统部署完成
  2. 安装redis服务

安装配置metricheat

  1. 安装metricheat
 rpm -ivh metricbeat-7.5.1-x86_64.rpm
  1. 修改metricbeat.yml配置文件
vi /etc/metricbeat/metricbeat.yml  
#修改kibana和elasticsearch地址
setup.kibana:
  host: "192.168.129.136:5601"
output.elasticsearch:
  hosts: ["192.168.129.136:9200"]
  1. 开启redis模块
cd /etc/metricbeat/modules.d
mv redis.yml.disabled redis.yml
  1. 修改redis.yml文件,改为以下内容
# Module: redis
# Docs: https://www.elastic.co/guide/en/beats/metricbeat/7.5/metricbeat-module-redis.html

- module: redis
  metricsets:
    - info
    - keyspace  
  period: 10s  
  
  # Redis hosts  
  hosts: ["127.0.0.1:6379"]  
  
  # Network type to be used for redis connection. Default: tcp  
  #network: tcp  
  # Max number of concurrent connections. Default: 10  
  #maxconn: 10  
  # Redis AUTH password. Empty by default.  
  #password: foobared
  1. 设置完成后,启动服务
systemctl start metricbeat
systemctl enable metricbeat
  1. 添加索引
    在这里插入图片描述
    添加完成之后,Discover会多出一个索引选项
    在这里插入图片描述
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wang_xian_s

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值