• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdatabase

redis-observability

プラグイン
redis-development
ライセンス
MIT
ソース
GitHub で見る ↗
説明

Redisの可視化と監視についてのガイド — 監視すべきメトリクス(メモリ使用量、接続数、キャッシュヒット率、1秒あたりの操作数、拒否された接続数)、トラブル発生時の調査に役立つ組み込みコマンド(SLOWLOG、INFO、MEMORY DOCTOR、CLIENT LIST、FT.PROFILE)、そしてRedis Insight GUI(グラフィカルな管理画面)をいつ使うべきかについて説明します。 **次のような場合に使用:** Redisインスタンスの監視とアラート設定を初めるとき、パフォーマンス低下の診断、FT.SEARCH クエリの遅延分析、またはPrometheusやDatadog などの監視ツールにRedisのメトリクスを連携させるとき。

原文を表示

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.

ユースケース
  • Redisインスタンス監視開始時
  • パフォーマンス低下を診断するとき
  • FT.SEARCHクエリの遅延分析
  • 監視ツールへのメトリクス連携
本文(日本語訳)

Redis オブザーバビリティ(監視・診断)

何を見守るか、何を実行するか、何についてアラートを設定するか。すべての Redis 配置(導入環境)が監視すべきメトリクス(数値指標)と、その場での診断に使う組み込みコマンドをまとめています。

適用場面

  • Redis インスタンスの監視やアラート設定を始めるとき
  • Redis のパフォーマンス低下(レイテンシー増加、メモリ逼迫、接続数の急増など)を診断するとき
  • 遅い FT.SEARCH クエリやパイプライン処理のボトルネック分析をするとき
  • Redis のメトリクスを Prometheus、Datadog、CloudWatch などの監視システムに連携するとき

1. 監視対象のメトリクス

これらは INFO コマンドから得られ、監視システムにエクスポート(転送)すべき値です。

メトリクス 意味 アラート条件
used_memory 現在のメモリ使用量 maxmemory の 80% 超過
connected_clients 開いている接続数 急激な増減
blocked_clients ブロッキング操作を待つクライアント数 0より大きい状態が継続
instantaneous_ops_per_sec 現在のスループット(処理速度) 大幅な低下
keyspace_hits / keyspace_misses キャッシュ命中率 命中率 < 80%
rejected_connections 最大クライアント数に達した回数 > 0
rdb_last_save_time 最後にデータを保存した時刻 目標 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%}")

詳しくは references/metrics.md を参照。

2. トラブルシューティング用の組み込みコマンド

何か異常を感じたときに実行するコマンドです。

用途 コマンド
遅いコマンド SLOWLOG GET 10 / SLOWLOG LEN / SLOWLOG RESET
サーバー状態のスナップショット INFO all(または INFO memory / INFO stats / INFO clients / INFO replication)
メモリ診断 MEMORY DOCTOR / MEMORY STATS / MEMORY USAGE <key>
接続情報 CLIENT LIST / CLIENT INFO
検索機能 FT.INFO <idx> / FT.PROFILE <idx> SEARCH QUERY "..."

インシデント対応で最も役立つ 2 つ:

  • SLOWLOG GET — slowlog-log-slower-than 設定値(デフォルト 10ms)を超えたクエリを見つけます。実行時間がマイクロ秒単位で表示されます。
  • MEMORY DOCTOR — メモリ逼迫の診断に使います。現在のメモリ使用状況で何が異常かを 1 段落の要約で返します。
for entry in redis.slowlog_get(10):
    print(f"{entry['duration']}μs  {entry['command']}")

詳しくは references/commands.md を参照。

3. Redis Insight

対話的な使用(クエリ実行、キー閲覧、インデックスのプロファイリング)には、公式 GUI ツールの Redis Insight が便利です。SLOWLOG / INFO / FT.PROFILE のデータを視覚的に表示でき、自然言語でクエリできる Redis Copilot も備えています。開発やインシデント対応時に活躍しますが、監視システムへのメトリクス転送の代替にはなりません。

参考資料

  • Redis: Latency monitoring
  • Redis Insight
原文(English)を表示

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.SEARCH or 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%}")

See references/metrics.md.

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 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.

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.

References

  • Redis: Latency monitoring
  • Redis Insight

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。