skills/redis-observability/SKILL.md
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.
npx skillsauth add redis/agent-skills redis-observabilityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
FT.SEARCH or pipeline.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%}")
See references/metrics.md.
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 GET to find queries that exceeded the slowlog-log-slower-than threshold (10ms by default). The output shows the exact command and duration in microseconds.MEMORY DOCTOR for 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']}")
See references/commands.md.
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.
development
Redis vector search guidance covering HNSW vs FLAT algorithm choice, vector index configuration (dims, distance metric, datatype), filtered hybrid search combining vector similarity with TAG or NUMERIC filters, and the RAG retrieval pattern with RedisVL. Use when defining a VECTOR field in FT.CREATE, integrating embeddings (OpenAI, Cohere, sentence-transformers), tuning HNSW parameters (M, EF_CONSTRUCTION, EF_RUNTIME), building a retrieval-augmented generation pipeline, or filtering vector results by attribute.
development
Redis LangCache guidance for semantic caching of LLM responses on Redis Cloud — calling search/set via the SDK or REST API, tuning the similarity threshold, separating caches per task type, and filtering with custom attributes. Use when caching LLM completions or RAG answers to cut API cost and latency, building a cache-aside layer in front of OpenAI / Anthropic / etc., tuning hit rate vs precision, or splitting one app's LLM workloads into multiple LangCache caches.
testing
Redis security guidance covering authentication (requirepass and ACL users), TLS, ACL-based least-privilege access control, restricting network exposure via bind and protected-mode, firewall rules, and disabling dangerous commands. Use when deploying Redis to production, defining ACL users for an application, configuring TLS connections, locking down a Redis instance behind a firewall, or auditing a Redis deployment for security hardening.
testing
Redis Query Engine (RQE) guidance covering FT.CREATE schema design, field type selection (TEXT, TAG, NUMERIC, GEO, GEOSHAPE, VECTOR), DIALECT 2 query syntax, efficient FT.SEARCH and FT.AGGREGATE queries, zero-downtime index updates via aliases, and the SKIPINITIALSCAN option. Use when defining a search index on Hash or JSON documents, picking between TEXT and TAG for filtering, writing FT.SEARCH queries with filters and SORTBY, managing or swapping indexes in production, or troubleshooting slow searches with FT.PROFILE.