hertzbeat icon indicating copy to clipboard operation
hertzbeat copied to clipboard

[feature:redis-slowlog] Add Redis Slow Query Monitoring with Real-time Visualization

Open YxYL6125 opened this issue 7 months ago • 2 comments

What's changed?

This PR implements Redis slow query monitoring with real-time visualization functionality. It addresses issue https://github.com/apache/hertzbeat/issues/1045 by adding the capability to track and display Redis slow queries as they occur. 这个PR实现了Redis慢查询实时监控和可视化功能。它解决了issue #1045中提出的需求,添加了跟踪和显示Redis慢查询的实时能力。

  1. Added a new 'slowlog' metric set in the Redis monitoring configuration 在Redis监控配置中添加了新的'slowlog'指标集
  2. Updated the Redis collector implementation to fetch and process slow query data 更新了Redis采集器实现,以获取和处理慢查询数据
  3. Added documentation for slow query monitoring in both English and Chinese 在中英文文档中添加了慢查询监控相关的说明

Checklist

  • [x] I have read the Contributing Guide
  • [x] I have written the necessary doc or comment.
  • [ ] I have added the necessary unit tests and all cases have passed.

Add or update API

  • [ ] I have added the necessary e2e tests and all cases have passed.

  • RedisCommonCollectImpl:

    1. collect: add logic handler for slow log
    2. getSingleRedisSlowLog: add getSingleRedisSlowLog method
    3. getClusterRedisSlowLog: add getClusterRedisSlowLog method
    4. parseSlowLogs: add parseSlowLogs method

image

YxYL6125 avatar Jun 18 '25 09:06 YxYL6125

@tomsun28 plz approve check-license-header ci check 🙏

YxYL6125 avatar Jun 19 '25 03:06 YxYL6125

@tomsun28 plz approve check-license-header ci check 🙏

hi sorry for slow response, there still has error.

tomsun28 avatar Jul 06 '25 13:07 tomsun28