Redis is a widely used in-memory database whose stability is critical. This article explains how to monitor Redis and Redis clusters.
- Collecting Redis Monitoring Data with Categraf
- Using Cprobe to Monitor MySQL, Redis, MongoDB, Oracle, Postgres, etc.
Principles of Redis Monitoring Data Collection
Whether you use Categraf or Redis-Exporter to collect Redis monitoring data, the principle is similar: connect to Redis via its address, username, and password, then run commands like info to gather metrics.
How to Integrate Redis-Exporter
Some users use Categraf to collect host metrics, process metrics, and custom plugin data, but rely on Redis-Exporter (instead of Categraf) to collect Redis monitoring data. They are often confused about how to feed Redis-Exporter data into Nightingale.
There are two approaches:
- Configure scrape rules directly in your time-series database to pull data from Redis-Exporter
- Use Categraf’s input.prometheus plugin to scrape Redis-Exporter data
FAQ
Q1: How do I get Redis monitoring metrics?
A: Use Categraf’s redis plugin — it connects to Redis, runs the INFO command, and parses all metrics. The metrics cover memory, connections, hit rate, slow queries, replication status, and more.
Q2: How do I monitor Redis Cluster / Sentinel?
A:
- Cluster: Install Categraf to monitor every shard node.
- Sentinel: Monitor master-slave failover events and the status of each sentinel instance.