Redis observability
Skill Pyfagorass/bookofspells/skills/redis/redis-observability
📖 The Book of Spells: a curated, enchanted index of real LLM tooling — and a pipeline that gathers SKILL.md skills from many houses into one searchable shelf.
npx -y skills add Pyfagorass/bookofspells --skill redis-observabilityAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Redis observability guidance — which metrics to monitor (memory, connections, hit ratio, ops/sec, rejected connections), which built-in commands to reach for during incident triage (SLOWLOG, INFO, MEMORY DOCTOR, CLIENT LIST, FT.PROFILE), and when to use the Redis Insight GUI. Use when setting up monitoring or alerts for a Redis instance, diagnosing a performance regression, profiling a slow FT.SEARCH query, or wiring Redis metrics into Prometheus, Datadog, or similar.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.6 KB, 781 tokens by cl100k_base, as published. Nobody here has run it
Redis Observability
What to watch, what to run, and what to alert on. Covers the metrics every Redis deployment should monitor and the built-in commands for ad-hoc diagnosis.
When to apply
- Setting up monitoring or alerts for a Redis instance.
- Diagnosing a Redis performance regression (high latency, memory pressure, connection storms).
- Profiling a slow
FT.SEARCHor pipeline. - Wiring Redis metrics into Prometheus, Datadog, CloudWatch, or similar.
1. Monitor these metrics
These come from INFO and should be exported to your monitoring system.
| Metric | What it tells you | Alert when |
|---|---|---|
used_memory | Current memory usage | > 80% of maxmemory |
connected_clients | Open connections | Sudden spikes or drops |
blocked_clients | Clients waiting on blocking ops | > 0 sustained |
instantaneous_ops_per_sec | Current throughput | Significant drops |
keyspace_hits / keyspace_misses | Cache hit ratio | Hit ratio < 80% |
rejected_connections | Hit maxclients cap | > 0 |
rdb_last_save_time | Last persistence snapshot | Too old vs. RPO |
info = redis.info()
hit_ratio = info["keyspace_hits"] / max(1, info["keyspace_hits"] + info["keyspace_misses"])
print(f"Memory: {info['used_memory_human']}")
print(f"Clients: {info['connected_clients']}")
print(f"Ops/sec: {info['instantaneous_ops_per_sec']}")
print(f"Hit ratio: {hit_ratio:.1%}")
2. Built-in commands for debugging
Reach for these when something looks off.
| Topic | Command |
|---|---|
| Slow commands | SLOWLOG GET 10 / SLOWLOG LEN / SLOWLOG RESET |
| Server snapshot | INFO all (or INFO memory / INFO stats / INFO clients / INFO replication) |
| Memory diagnostics | MEMORY DOCTOR / MEMORY STATS / MEMORY USAGE <key> |
| Connections | CLIENT LIST / CLIENT INFO |
| RQE / Search | FT.INFO <idx> / FT.PROFILE <idx> SEARCH QUERY "..." |
The two most useful for incident triage:
SLOWLOG GETto find queries that exceeded theslowlog-log-slower-thanthreshold (10ms by default). The output shows the exact command and duration in microseconds.MEMORY DOCTORfor memory pressure — it returns a one-paragraph summary of what's unusual about memory usage right now.
for entry in redis.slowlog_get(10):
print(f"{entry['duration']}μs {entry['command']}")
3. Redis Insight
For interactive use (running queries, browsing keys, profiling indexes), Redis Insight is the official GUI. It surfaces the same SLOWLOG / INFO / FT.PROFILE data visually and includes Redis Copilot for natural-language queries. Useful during development and incident response; not a replacement for exporting metrics to your monitoring system.