Supported OS Linux Windows Mac OS

インテグレーションバージョン7.3.0

概要

Redis をデータベース、キャッシュ、メッセージキューとして使用しているかどうかにかかわらず、このインテグレーションは、Redis サーバー、クラウドサービス、およびそれらが提供するインフラストラクチャーの一部の問題を追跡します。Datadog Agent の Redis チェックを使用して、以下に関連するメトリクスを収集します。

  • パフォーマンス
  • メモリ使用量
  • ブロックされたクライアント
  • 二次接続
  • ディスクの永続性
  • キーの期限切れとエビクション
  • その他多数

セットアップ

インストール

Redis チェックは Datadog Agent パッケージに含まれています。Redis サーバーに追加でインストールする必要はありません。

構成

ホスト

ホストで実行中の Agent に対してこのチェックを構成するには

メトリクスの収集
  1. Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの redisdb.d/conf.yaml ファイルを編集します。以下のパラメーターは、更新が必要な場合があります。使用可能なすべてのコンフィギュレーションオプションの詳細については、redisdb.d/conf.yaml のサンプルを参照してください。

    init_config:
    instances:
      ## @param host - string - required
      ## Enter the host to connect to.
      - host: localhost
        ## @param port - integer - required
        ## Enter the port of the host to connect to.
        port: 6379
    
        ## @param username - string - optional
        ## The username to use for the connection. Redis 6+ only.
        #
        # username: <USERNAME>
    
        ## @param password - string - optional
        ## The password to use for the connection.
        #
        # password: <PASSWORD>
    
  2. Redis 6+ と ACL を使用する場合、少なくともデータベースレベルの DB Viewer 権限、クラスター環境で運用する場合は Cluster Viewer 権限、および +config|get +info +slowlog|get ACL ルールが必要であることを確認してください。詳しくは、データベースアクセス制御を参照してください。

  3. Agent を再起動します

ログ収集

Agent バージョン 6.0 以降で利用可能

  1. Datadog Agent で、ログの収集はデフォルトで無効になっています。以下のように、datadog.yaml ファイルでこれを有効にします。

    logs_enabled: true
    
  2. redisdb.d/conf.yaml の下部にある、次の構成ブロックのコメントを解除して編集します。

    logs:
      - type: file
        path: /var/log/redis_6379.log
        source: redis
        service: myapplication
    

    path パラメーターと service パラメーターの値を変更し、環境に合わせて構成してください。使用可能なすべてのコンフィギュレーションオプションの詳細については、redisdb.yaml のサンプルを参照してください。

  3. Agent を再起動します

トレースの収集

Datadog APM は、Redis と統合して分散システム全体のトレースを確認します。Datadog Agent v6 以降では、トレースの収集はデフォルトで有効化されています。トレースの収集を開始するには、以下の手順に従います。

  1. Datadog でトレースの収集を有効にします
  2. Redis へのリクエストを作成するアプリケーションをインスツルメントします

Docker

コンテナで実行中の Agent に対してこのチェックを構成するには:

メトリクスの収集

アプリケーションのコンテナで、オートディスカバリーのインテグレーションテンプレートを Docker ラベルとして設定します。

LABEL "com.datadoghq.ad.check_names"='["redisdb"]'
LABEL "com.datadoghq.ad.init_configs"='[{}]'
LABEL "com.datadoghq.ad.instances"='[{"host":"%%host%%","port":"6379","password":"%%env_REDIS_PASSWORD%%"}]'

: パスワードがプレーンテキストで保存されることを避けるため、"%%env_<ENV_VAR>%%" テンプレート変数ロジックが使用されています。そのため、REDIS_PASSWORD 環境変数は Agent コンテナに設定される必要があります。詳細は、オートディスカバリーのテンプレート変数ドキュメントをご参照ください。または、Agent で secrets パッケージを利用してシークレット管理バックエンド(HashiCorp Vault または AWS Secrets Manager)と動作することも可能です。

ログ収集

Agent バージョン 6.0 以降で利用可能

Datadog Agent で、ログの収集はデフォルトで無効になっています。有効にする方法については、Docker ログ収集を参照してください。

次に、ログインテグレーションを Docker ラベルとして設定します。

LABEL "com.datadoghq.ad.logs"='[{"source":"redis","service":"<YOUR_APP_NAME>"}]'
トレースの収集

コンテナ化されたアプリケーションの APM は、Agent v6 以降でサポートされていますが、トレースの収集を開始するには、追加のコンフィギュレーションが必要です。

Agent コンテナで必要な環境変数

パラメーター
<DD_API_KEY>api_key
<DD_APM_ENABLED>true
<DD_APM_NON_LOCAL_TRAFFIC>true

利用可能な環境変数およびコンフィギュレーションの全リストについては、Docker アプリケーションのトレース を参照してください。

次に、Redis にリクエストを送信するアプリケーションのコンテナをインスツルメントし、Agent のコンテナ名に DD_AGENT_HOST を設定します。

Kubernetes

このチェックを、Kubernetes で実行している Agent に構成します。

メトリクスの収集

メトリクスを収集するには、オートディスカバリーテンプレートに以下のパラメーターと値を設定します。これは、Redis ポッドの Kubernetes アノテーション (下記参照) またはローカルファイル、ConfigMap、キーバリューストア、Datadog Operator マニフェスト、または Helm チャートを使用して行うことができます。

パラメーター
<INTEGRATION_NAME>["redisdb"]
<INIT_CONFIG>[{}]
<INSTANCE_CONFIG>[{"host": "%%host%%","port":"6379","password":"%%env_REDIS_PASSWORD%%"}]

Annotations v1 (Datadog Agent < v7.36 向け)

apiVersion: v1
kind: Pod
metadata:
  name: redis
  annotations:
    ad.datadoghq.com/redis.check_names: '["redisdb"]'
    ad.datadoghq.com/redis.init_configs: '[{}]'
    ad.datadoghq.com/redis.instances: |
      [
        {
          "host": "%%host%%",
          "port":"6379",
          "password":"%%env_REDIS_PASSWORD%%"
        }
      ]
  labels:
    name: redis
spec:
  containers:
    - name: redis
      image: redis:latest
      ports:
        - containerPort: 6379

Annotations v2 (Datadog Agent v7.36+ 向け)

apiVersion: v1
kind: Pod
metadata:
  name: redis
  annotations:
    ad.datadoghq.com/redis.checks: |
      {
        "redisdb": {
          "init_config": {},
          "instances": [
            {
              "host": "%%host%%",
              "port":"6379",
              "password":"%%env_REDIS_PASSWORD%%"
            }
          ]
        }
      }
  labels:
    name: redis
spec:
  containers:
    - name: redis
      image: redis:latest
      ports:
        - containerPort: 6379

: パスワードがプレーンテキストで保存されることを避けるため、"%%env_<ENV_VAR>%%" テンプレート変数ロジックが使用されています。そのため、REDIS_PASSWORD 環境変数は Agent コンテナに設定される必要があります。詳細は、オートディスカバリーのテンプレート変数ドキュメントをご参照ください。または、Agent で secrets パッケージを利用してシークレット管理バックエンド(HashiCorp Vault または AWS Secrets Manager)と動作することも可能です。

ログ収集

Agent バージョン 6.0 以降で利用可能

Datadog Agent で、ログの収集はデフォルトで無効になっています。有効にする方法については、Kubernetes ログ収集を参照してください。

次に、オートディスカバリーテンプレートに以下のパラメーターを設定します。これは、Redis ポッドの Kubernetes アノテーション (下記参照) またはローカルファイル、ConfigMap、キーバリューストア、Datadog Operator マニファスト、または Helm チャートを使用して行うことができます。

パラメーター
<LOG_CONFIG>[{"source":"redis","service":"<YOUR_APP_NAME>"}]

Annotations v1/v2

apiVersion: v1
kind: Pod
metadata:
  name: redis
  annotations:
    ad.datadoghq.com/redis.logs: '[{"source":"redis","service":"<YOUR_APP_NAME>"}]'
  labels:
    name: redis
spec:
  containers:
    - name: redis
      image: redis:latest
      ports:
        - containerPort: 6379
トレースの収集

コンテナ化されたアプリケーションの APM は、Agent v6 以降を実行するホストでサポートされていますが、トレースの収集を開始するには、追加のコンフィギュレーションが必要です。

Agent コンテナで必要な環境変数

パラメーター
<DD_API_KEY>api_key
<DD_APM_ENABLED>true
<DD_APM_NON_LOCAL_TRAFFIC>true

利用可能な環境変数とコンフィギュレーションの完全なリストについては、Kubernetes アプリケーションのトレースおよび Kubernetes Daemon のセットアップを参照してください。

そして、Redis へのリクエストを作成するアプリケーションコンテナをインスツルメントします

ECS

このチェックを、ECS で実行している Agent に構成するには:

メトリクスの収集

アプリケーションのコンテナで、オートディスカバリーのインテグレーションテンプレートを Docker ラベルとして設定します。

{
  "containerDefinitions": [{
    "name": "redis",
    "image": "redis:latest",
    "dockerLabels": {
      "com.datadoghq.ad.check_names": "[\"redisdb\"]",
      "com.datadoghq.ad.init_configs": "[{}]",
      "com.datadoghq.ad.instances": "[{\"host\":\"%%host%%\",\"port\":\"6379\",\"password\":\"%%env_REDIS_PASSWORD%%\"}]"
    }
  }]
}

: パスワードがプレーンテキストで保存されることを避けるため、"%%env_<ENV_VAR>%%" テンプレート変数ロジックが使用されています。そのため、REDIS_PASSWORD 環境変数は Agent コンテナに設定される必要があります。詳細は、オートディスカバリーのテンプレート変数ドキュメントをご参照ください。または、Agent で secrets パッケージを利用してシークレット管理バックエンド(HashiCorp Vault または AWS Secrets Manager)と動作することも可能です。

ログ収集

Agent バージョン 6.0 以降で利用可能

Datadog Agent で、ログの収集はデフォルトで無効になっています。有効にする方法については、ECS ログ収集を参照してください。

次に、ログインテグレーションを Docker ラベルとして設定します。

{
  "containerDefinitions": [{
    "name": "redis",
    "image": "redis:latest",
    "dockerLabels": {
      "com.datadoghq.ad.logs": "[{\"source\":\"redis\",\"service\":\"<YOUR_APP_NAME>\"}]"
    }
  }]
}
トレースの収集

コンテナ化されたアプリケーションの APM は、Agent v6 以降でサポートされていますが、トレースの収集を開始するには、追加のコンフィギュレーションが必要です。

Agent コンテナで必要な環境変数

パラメーター
<DD_API_KEY>api_key
<DD_APM_ENABLED>true
<DD_APM_NON_LOCAL_TRAFFIC>true

利用可能な環境変数およびコンフィギュレーションの全リストについては、Docker アプリケーションのトレース を参照してください。

次に、Redis にリクエストを送信するアプリケーションのコンテナをインスツルメントし、 EC2 プライベート IP アドレスDD_AGENT_HOST を設定します。

検証

Agent の status サブコマンドを実行し、Checks セクションで redisdb を探します。

収集データ

メトリクス

redis.acl.denied.auth
(gauge)
Number of authentication failures
redis.acl.denied.channel
(gauge)
Number of commands rejected because of access denied to a channel
redis.acl.denied.cmd
(gauge)
Number of commands rejected because of access denied to the command
redis.acl.denied.key
(gauge)
Number of commands rejected because of access denied to a key
redis.active_defrag.hits
(gauge)
Number of value reallocations performed by the active defragmentation process.
Shown as operation
redis.active_defrag.key_hits
(gauge)
Number of keys that were actively defragmented.
Shown as key
redis.active_defrag.key_misses
(gauge)
Number of keys that were skipped by.
Shown as key
redis.active_defrag.misses
(gauge)
Number of aborted value reallocations started by the active defragmentation process.
Shown as operation
redis.active_defrag.running
(gauge)
Whether active defragmentation is running or not.
redis.allocator.active
(gauge)
Total bytes in the allocator active pages, this includes external-fragmentation
Shown as byte
redis.allocator.allocated
(gauge)
Total bytes allocated form the allocator, including internal-fragmentation. Normally the same as redis.mem.used.
Shown as byte
redis.allocator.debug.active_lua
(gauge)
Total bytes in the allocator active pages specifically for Lua, including external-fragmentation.
Shown as byte
redis.allocator.debug.allocated_lua
(gauge)
Total bytes allocated from the allocator specifically for Lua, including internal-fragmentation.
Shown as byte
redis.allocator.debug.frag_bytes_lua
(gauge)
Delta between redis.allocator.debug.active_lua and redis.allocator.debug.allocated_lua.
Shown as byte
redis.allocator.debug.resident_lua
(gauge)
Total bytes resident (RSS) in the allocator specifically for Lua. This includes pages that can be released to the OS (by MEMORY PURGE, or just waiting).
Shown as byte
redis.allocator.frag_ratio
(gauge)
Ratio between redis.allocator.active and redis.allocator.allocated. This is the true (external) fragmentation metric (not redis.mem.fragmentation_ratio).
Shown as byte
redis.allocator.muzzy
(gauge)
Total bytes of ‘muzzy’ memory (RSS) in the allocator. Muzzy memory is memory that has been freed, but not yet fully returned to the operating system. It can be reused immediately when needed or reclaimed by the OS when system pressure increases.
Shown as byte
redis.allocator.resident
(gauge)
Total byte resident (RSS) in the allocator, this includes pages that can be released to the OS (by MEMORY PURGE, or just waiting).
redis.allocator.rss_bytes
(gauge)
Delta between redis.allocator.resident and redis.allocator.active
Shown as byte
redis.allocator.rss_ratio
(gauge)
Ratio between redis.allocator.resident and redis.allocator.active. This usually indicates pages that the allocator can and probably will soon release back to the OS.
redis.aof.base_size
(gauge)
AOF file size on latest startup or rewrite
Shown as byte
redis.aof.buffer_length
(gauge)
Size of the AOF buffer.
Shown as byte
redis.aof.delayed_fsync
(gauge)
Delayed fsync counter
redis.aof.enabled
(gauge)
Flag indicating AOF logging is activated
redis.aof.last_cow_size
(gauge)
The size in bytes of copy-on-write memory during
Shown as byte
redis.aof.last_rewrite_time
(gauge)
Duration of the last AOF rewrite.
Shown as second
redis.aof.loading_eta_seconds
(gauge)
The estimated amount of time left to load.
Shown as second
redis.aof.loading_loaded_bytes
(gauge)
The amount of bytes to load.
Shown as byte
redis.aof.loading_loaded_perc
(gauge)
The percent loaded.
Shown as percent
redis.aof.loading_total_bytes
(gauge)
The total amount of bytes already loaded.
Shown as byte
redis.aof.pending_bio_fsync
(gauge)
Number of fsync pending jobs in background I/O
redis.aof.pending_rewrite
(gauge)
Flag indicating an AOF rewrite operation
redis.aof.rewrite
(gauge)
Flag indicating a AOF rewrite operation is on-going.
redis.aof.rewrite.buffer_length
(gauge)
Size of the AOF rewrite buffer. Note this field was removed in Redis 7.0
Shown as byte
redis.aof.rewrite.current_time_sec
(gauge)
Duration of the on-going AOF rewrite
Shown as second
redis.aof.rewrite.scheduled
(gauge)
Flag indicating an AOF rewrite operation
redis.aof.rewrites
(gauge)
Number of AOF rewrites performed since startup
redis.aof.size
(gauge)
AOF current file size (redis.aof.size).
Shown as byte
redis.clients.biggest_input_buf
(gauge)
The biggest input buffer among current client connections [v3 & v4].
redis.clients.blocked
(gauge)
The number of connections waiting on a blocking call.
Shown as connection
redis.clients.evicted
(gauge)
Number of evicted clients due to maxmemory-clients limit
redis.clients.longest_output_list
(gauge)
The longest output list among current client connections [v3 & v4].
redis.clients.output_buffer_limit_disconnections
(gauge)
Total number of disconnections due to client reaching output buffer limit
redis.clients.query_buffer_limit_disconnections
(gauge)
Total number of disconnections due to client reaching query buffer limit
redis.clients.recent_max_input_buffer
(gauge)
The biggest input buffer among recent client connections [v5+].
redis.clients.recent_max_output_buffer
(gauge)
The longest output buffer among recent client connections [v5+].
redis.clients.timeout_table
(gauge)
Number of clients in the clients timeout table
redis.clients.watching
(gauge)
Number of clients in watching mode (WATCH)
redis.cluster.connections
(gauge)
An approximation of the number of sockets used by the cluster’s bus
redis.cluster.enabled
(gauge)
Indicate Redis cluster is enabled
redis.command.calls
(gauge)
The number of times a redis command has been called, tagged by ‘command’, e.g. ‘command:append’. Enable in Agent’s redisdb.yaml with the command_stats option.
redis.command.usec_per_call
(gauge)
The CPU time consumed per redis command call, tagged by ‘command’, e.g. ‘command:append’. Enable in Agent’s redisdb.yaml with the command_stats option.
Shown as microsecond
redis.commands.total_processed
(gauge)
Total number of commands processed by the server
redis.cow.current_peak
(gauge)
The peak size in bytes of copy-on-write memory
Shown as byte
redis.cow.current_size
(gauge)
The size in bytes of copy-on-write memory
Shown as byte
redis.cow.current_size_age
(gauge)
The age, in seconds, of the redis.cow.current_size value.
Shown as second
redis.cpu.sys
(gauge)
System CPU consumed by the Redis server.
redis.cpu.sys_children
(gauge)
System CPU consumed by the background processes.
redis.cpu.sys_main_thread
(gauge)
System CPU consumed by the Redis server main thread [v7+].
redis.cpu.user
(gauge)
User CPU consumed by the Redis server.
redis.cpu.user_children
(gauge)
User CPU consumed by the background processes.
redis.cpu.user_main_thread
(gauge)
User CPU consumed by the Redis server main thread [v7+].
redis.defrag.current_active_time
(gauge)
The time passed since memory fragmentation last was over the limit, in milliseconds
Shown as millisecond
redis.defrag.total_active_time
(gauge)
Total time memory fragmentation was over the limit, in milliseconds
Shown as millisecond
redis.errors.total_replies
(gauge)
Total number of issued error replies, that is the sum of rejected commands (errors prior command execution) and failed commands (errors within the command execution)
redis.errors.unexpected_replies
(gauge)
Number of unexpected error replies, that are types of errors from an AOF load or replication
redis.eventloop.cmd_per_cycle_max
(gauge)
The maximal number of commands processed in a single eventloop cycle
redis.eventloop.cycles
(gauge)
Total number of eventloop cycles
redis.eventloop.duration_aof_sum
(gauge)
Total time spent on flushing AOF in eventloop in microseconds.
Shown as microsecond
redis.eventloop.duration_cmd_sum
(gauge)
Total time spent on executing commands in microseconds
Shown as microsecond
redis.eventloop.duration_cron_sum
(gauge)
Total time consumption of cron in microseconds (including serverCron and beforeSleep, but excluding IO and AOF flushing).
Shown as microsecond
redis.eventloop.duration_max
(gauge)
The maximal time spent in a single eventloop cycle in microseconds.
Shown as microsecond
redis.eventloop.duration_sum
(gauge)
Total time spent in the eventloop in microseconds (including I/O and command processing)
Shown as microsecond
redis.eventloop.instantaneous_cycles_per_sec
(gauge)
Number of eventloop cycles per second
redis.eventloop.instantaneous_duration_usec
(gauge)
Average time spent in a single eventloop cycle in microseconds
Shown as microsecond
redis.eviction.current_exceeded_time
(gauge)
The time passed since redis.mem.used last rose above redis.mem.maxmemory, in milliseconds
Shown as millisecond
redis.eviction.total_exceeded_time
(gauge)
Total time redis.mem.used was greater than redis.mem.maxmemory since server startup, in milliseconds
Shown as millisecond
redis.expire_cycle.cpu_milliseconds
(gauge)
The cumulative amount of time spent on active expiry cycles
Shown as millisecond
redis.expired.subkeys
(gauge)
The number of hash field expiration events
redis.expired.time_cap_reached_count
(gauge)
The count of times that active expiry cycles have stopped early
redis.expires
(gauge)
The number of keys with an expiration.
Shown as key
redis.expires.percent
(gauge)
Percentage of total keys with an expiration.
Shown as percent
redis.fork.total
(gauge)
Total number of fork operations since the server start
redis.functions.count
(gauge)
The number of functions [v7+].
redis.info.latency_ms
(gauge)
The latency of the redis INFO command.
Shown as millisecond
redis.key.length
(gauge)
The number of elements in a given key, tagged by key, e.g. ‘key:mykeyname’. Enable in Agent’s redisdb.yaml with the keys option.
redis.keys
(gauge)
The total number of keys.
Shown as key
redis.keys.evicted
(gauge)
The total number of keys evicted due to the maxmemory limit.
Shown as key
redis.keys.expired
(gauge)
The total number of keys expired from the db.
Shown as key
redis.keys.total_blocking
(gauge)
Number of blocking keys [v7.2+].
redis.keys.total_blocking_on_nokey
(gauge)
Number of blocking keys that one or more clients that would like to be unblocked when the key is deleted [v7.2+].
redis.keys.total_watched
(gauge)
Number of watched keys [v7.4+].
redis.libraries.count
(gauge)
The number of libraries [v7+].
redis.loading.loading
(gauge)
Flag indicating if the load of a dump file is on-going
redis.loading.rdb_used_mem
(gauge)
The memory usage of the server that had generated the RDB file at the time of the file’s creation
Shown as byte
redis.loading.start_time
(gauge)
Epoch-based timestamp of the start of the load
redis.mem.clients_normal
(gauge)
The total size in byte of all clients overheads.
Shown as byte
redis.mem.clients_slaves
(gauge)
The total size in byte of all replicas overheads.
Shown as byte
redis.mem.dataset
(gauge)
The size in byte of the dataset.
Shown as byte
redis.mem.fragmentation
(gauge)
Delta between redis.mem.rss and redis.mem.used.
Shown as byte
redis.mem.fragmentation_ratio
(gauge)
Ratio between redis.mem.rss and redis.mem.used.
Shown as fraction
redis.mem.functions
(gauge)
Number of byte overhead by Function scripts (part of redis.mem.used). [v7+].
Shown as byte
redis.mem.lua
(gauge)
Amount of memory used by the Lua engine.
Shown as byte
redis.mem.maxmemory
(gauge)
Maximum amount of memory allocated to the Redisdb system.
Shown as byte
redis.mem.overhead
(gauge)
Sum of all overheads allocated by Redis for managing its internal datastructures [v4+].
Shown as byte
redis.mem.peak
(gauge)
The peak amount of memory used by Redis.
Shown as byte
redis.mem.rss
(gauge)
Amount of memory that Redis allocated as seen by the os.
Shown as byte
redis.mem.scripts
(gauge)
redis.mem.scripts_eval + redis.mem.functions (part of redis.mem.used) [v7+].
Shown as byte
redis.mem.scripts_eval
(gauge)
Number of byte overhead by the EVAL scripts (part of redis.mem.used) [v7+].
Shown as byte
redis.mem.startup
(gauge)
Amount of memory consumed by Redis at startup.
Shown as byte
redis.mem.total_replication_buffers
(gauge)
Total memory consumed for replication buffers [v7+].
Shown as byte
redis.mem.used
(gauge)
Amount of memory allocated by Redis.
Shown as byte
redis.mem.vm_eval
(gauge)
Number of byte used by the script VM engines for EVAL framework (not part of redis.mem.used) [v7+].
Shown as byte
redis.mem.vm_functions
(gauge)
Number of byte used by the script VM engines for Functions framework (not part of redis.mem.used) [v7+].
Shown as byte
redis.mem.vm_total
(gauge)
redis.mem.vm_eval + redis.mem.vm_functions (not part of redis.mem.used) [v7+].
Shown as byte
redis.memory.aof_buffer
(gauge)
Transient memory used for AOF and AOF rewrite buffers
Shown as byte
redis.memory.cluster_links
(gauge)
Memory used by links to peers on the cluster bus when cluster mode is enabled.
Shown as byte
redis.memory.not_counted_for_evict
(gauge)
Used memory that’s not counted for key eviction. This is basically transient replica and AOF buffers.
Shown as byte
redis.memory.overhead_db_hashtable_rehashing
(gauge)
Temporary memory overhead of database dictionaries currently being rehashed [v7.4+].
Shown as byte
redis.memory.peak_time
(gauge)
Time when peak memory was recorded
redis.memory.replication_backlog
(gauge)
Memory used by replication backlog
Shown as byte
redis.memory.rss_overhead_bytes
(gauge)
Delta between redis.mem.rss (the process RSS) and redis.allocator.resident
Shown as byte
redis.memory.rss_overhead_ratio
(gauge)
Ratio between redis.mem.rss (the process RSS) and redis.allocator.resident. This includes RSS overheads that are not allocator or heap related.
Shown as byte
redis.net.clients
(gauge)
The number of connected clients (excluding slaves).
Shown as connection
redis.net.commands
(gauge)
The number of commands processed by the server.
Shown as command
redis.net.commands.instantaneous_ops_per_sec
(gauge)
The number of commands processed by the server per second.
Shown as command
redis.net.connections
(gauge)
The number of connections tagged by client name.
Shown as connection
redis.net.instantaneous_input
(gauge)
The network’s read rate per second in KB/sec.
Shown as kibibyte
redis.net.instantaneous_ops_per_sec
(gauge)
Number of commands processed per second.
Shown as operation
redis.net.instantaneous_output
(gauge)
The network’s write rate per second in KB/sec.
Shown as kibibyte
redis.net.maxclients
(gauge)
The maximum number of connected clients.
Shown as connection
redis.net.migrate_cached_sockets
(gauge)
The number of sockets open for MIGRATE purposes
redis.net.rejected
(gauge)
The number of rejected connections.
Shown as connection
redis.net.slaves
(gauge)
The number of connected slaves.
Shown as connection
redis.net.total_connections_received
(gauge)
Total number of connections accepted by the server.
Shown as connection
redis.net.total_input_bytes
(gauge)
The total number of bytes read from the network
Shown as byte
redis.net.total_output_bytes
(gauge)
The total number of bytes written to the network
Shown as byte
redis.ops.reads_processed
(gauge)
Total number of read events processed
redis.ops.writes_processed
(gauge)
Total number of write events processed
redis.perf.latest_fork_usec
(gauge)
The duration of the latest fork.
Shown as microsecond
redis.persist
(gauge)
The number of keys persisted (redis.keys - redis.expires).
Shown as key
redis.persist.percent
(gauge)
Percentage of total keys that are persisted.
Shown as percent
redis.ping.latency_ms
(gauge)
The latency of the redis PING command.
Shown as millisecond
redis.pubsub.channels
(gauge)
The number of active pubsub channels.
redis.pubsub.clients
(gauge)
Number of clients in pubsub mode (SUBSCRIBE, PSUBSCRIBE, SSUBSCRIBE)
redis.pubsub.patterns
(gauge)
The number of active pubsub patterns.
redis.pubsub.shard_channels
(gauge)
Global number of pub/sub shard channels with client subscriptions
redis.rdb.bgsave
(gauge)
One if a bgsave is in progress and zero otherwise.
redis.rdb.changes_since_last
(gauge)
The number of changes since the last background save.
redis.rdb.current_bgsave_time_sec
(gauge)
Duration of the on-going RDB save operation
Shown as second
redis.rdb.last_bgsave_time
(gauge)
Duration of the last bg_save operation.
Shown as second
redis.rdb.last_cow_size
(gauge)
The size in bytes of copy-on-write memory during the last RDB save operation
Shown as byte
redis.rdb.last_load.keys_expired
(gauge)
Number of volatile keys deleted during the last RDB loading [v7+].
redis.rdb.last_load.keys_loaded
(gauge)
Number of keys loaded during the last RDB loading [v7+].
redis.rdb.last_save_time
(gauge)
Epoch-based timestamp of last successful RDB save
redis.rdb.saves
(gauge)
Number of RDB snapshots performed since startup
redis.replication.backlog_active
(gauge)
Flag indicating replication backlog is active
redis.replication.backlog_first_byte_offset
(gauge)
The master offset of the replication
redis.replication.backlog_histlen
(gauge)
The amount of data in the backlog sync buffer.
Shown as byte
redis.replication.backlog_size
(gauge)
Total size in bytes of the replication backlog buffer
Shown as byte
redis.replication.delay
(gauge)
The replication delay in offsets.
Shown as offset
redis.replication.input_total_bytes
(gauge)
The total number of bytes read from the network for replication purposes
Shown as byte
redis.replication.instantaneous_input_kbps
(gauge)
The network’s read rate per second in KB/sec for replication purposes
Shown as kilobyte
redis.replication.instantaneous_output_kbps
(gauge)
The network’s write rate per second in KB/sec for replication purposes
Shown as kilobyte
redis.replication.last_io_seconds_ago
(gauge)
Amount of time since the last interaction with master.
Shown as second
redis.replication.master_link_down_since_seconds
(gauge)
Amount of time that the master link has been down.
Shown as second
redis.replication.master_port
(gauge)
Master listening TCP port
redis.replication.master_repl_offset
(gauge)
The replication offset reported by the master.
Shown as offset
redis.replication.min_slaves_good_slaves
(gauge)
Number of replicas currently considered good
redis.replication.output_total_bytes
(gauge)
The total number of bytes written to the network for replication purposes
Shown as byte
redis.replication.replica_announced
(gauge)
Flag indicating if the replica is announced by Sentinel.
redis.replication.second_repl_offset
(gauge)
The offset up to which replication IDs are accepted
redis.replication.slave.expires_tracked_keys
(gauge)
The number of keys tracked for expiry purposes
redis.replication.slave.priority
(gauge)
The priority of the instance as a candidate for failover
redis.replication.slave.read_only
(gauge)
Flag indicating if the replica is read-only
redis.replication.slave.read_repl_offset
(gauge)
The read replication offset of the replica instance.
redis.replication.slave_repl_offset
(gauge)
The replication offset reported by the slave.
Shown as offset
redis.replication.sync
(gauge)
One if a sync is in progress and zero otherwise.
redis.replication.sync.full
(gauge)
The number of full resyncs with replicas
redis.replication.sync.last_io_seconds_ago
(gauge)
Number of seconds since last transfer I/O
Shown as second
redis.replication.sync.partial_err
(gauge)
The number of denied partial resync requests
redis.replication.sync.partial_ok
(gauge)
The number of accepted partial resync requests
redis.replication.sync.read_bytes
(gauge)
Number of bytes already transferred
Shown as byte
redis.replication.sync.total_bytes
(gauge)
Total number of bytes that need to be transferred. This may be 0 when the size is unknown (for example, when the repl-diskless-sync configuration directive is used)
Shown as byte
redis.replication.sync_left_bytes
(gauge)
Amount of data left before syncing is complete.
Shown as byte
redis.reply_buffer.expands
(gauge)
Total number of output buffer expands
redis.reply_buffer.shrinks
(gauge)
Total number of output buffer shrinks
redis.scripts.cached
(gauge)
The number of EVAL scripts cached by the server [v7+].
redis.scripts.evicted
(gauge)
Number of evicted EVAL scripts due to LRU policy [v7.4+].
redis.search.bytes_collected
(gauge)
The total amount of memory freed by the garbage collectors from indexes in the shard memory in bytes
Shown as byte
redis.search.cursors.internal_active
(gauge)
The total number of coordinator cursors in the shard, either holding pending results or actively executing FT.CURSOR READ
redis.search.cursors.internal_idle
(gauge)
The total number of coordinator cursors that are currently holding pending results in the shard
redis.search.cursors.user_active
(gauge)
The total number of user cursors in the shard, either holding pending results or actively executing FT.CURSOR READ
redis.search.cursors.user_idle
(gauge)
The total number of cursors that were explicitly requested by users, that are currently holding pending results in the shard
redis.search.docs_not_collected
(gauge)
The number of documents marked as deleted whose memory has not yet been freed by the garbage collector
redis.search.errors.indexing_failures
(gauge)
The total number of indexing failures recorded across all indexes in the shard
redis.search.errors.max_failures
(gauge)
The number of indexing failures in the index with the highest count of failures
redis.search.fields.geo.geo
(gauge)
The total number of GEO fields across all indexes in the shard
redis.search.fields.geo.noindex
(gauge)
The total number of NOINDEX GEO fields across all indexes in the shard; i.e., used for sorting only but not indexed. This field appears only if its value is larger than 0
redis.search.fields.geo.sortable
(gauge)
The total number of SORTABLE GEO fields across all indexes in the shard. This field appears only if its value is larger than 0
redis.search.fields.geoshape.geoshape
(gauge)
The total number of GEOSHAPE fields across all indexes in the shard
redis.search.fields.geoshape.noindex
(gauge)
The total number of NOINDEX GEOSHAPE fields across all indexes in the shard; i.e., used for sorting only but not indexed. This field appears only if its value is larger than 0
redis.search.fields.geoshape.sortable
(gauge)
The total number of SORTABLE GEOSHAPE fields across all indexes in the shard. This field appears only if its value is larger than 0
redis.search.fields.numeric.noindex
(gauge)
The total number of NOINDEX NUMERIC fields across all indexes in the shard; i.e., used for sorting only but not indexed. This field appears only if its value is larger than 0
redis.search.fields.numeric.numeric
(gauge)
The total number of NUMERIC fields across all indexes in the shard
redis.search.fields.numeric.sortable
(gauge)
The total number of SORTABLE NUMERIC fields across all indexes in the shard. This field appears only if its value is larger than 0
redis.search.fields.tag.case_sensitive
(gauge)
The total number of CASESENSITIVE TAG fields across all indexes in the shard. This field appears only if its value is larger than 0
redis.search.fields.tag.noindex
(gauge)
The total number of NOINDEX TAG fields across all indexes in the shard; i.e., used for sorting only but not indexed. This field appears only if its value is larger than 0
redis.search.fields.tag.sortable
(gauge)
The total number of SORTABLE TAG fields across all indexes in the shard. This field appears only if its value is larger than 0
redis.search.fields.tag.tag
(gauge)
The total number of TAG fields across all indexes in the shard
redis.search.fields.text.noindex
(gauge)
The total number of NOINDEX TEXT fields across all indexes in the shard, which are used for sorting only but not indexed. This field appears only if its value is larger than 0
redis.search.fields.text.sortable
(gauge)
The total number of SORTABLE TEXT fields across all indexes in the shard. This field appears only if its value is larger than 0
redis.search.fields.text.text
(gauge)
The total number of TEXT fields across all indexes in the shard
redis.search.fields.vector.flat
(gauge)
The total number of FLAT VECTOR fields across all indexes in the shard
redis.search.fields.vector.hnsw
(gauge)
The total number of HNSW VECTOR fields across all indexes in the shard
redis.search.fields.vector.vector
(gauge)
The total number of VECTOR fields across all indexes in the shard
redis.search.gc.bytes_collected
(gauge)
The total amount of memory freed by the garbage collectors from indexes in the shard’s memory in bytes
Shown as byte
redis.search.gc.docs_not_collected
(gauge)
The number of documents marked as deleted, whose memory has not yet been freed by the garbage collector
redis.search.gc.marked_deleted_vectors
(gauge)
The number of vectors marked as deleted in the vector indexes that have not yet been cleaned
redis.search.gc.total_cycles
(gauge)
The total number of garbage collection cycles executed
redis.search.gc.total_ms_run
(gauge)
The total duration of all garbage collection cycles in the shard, measured in milliseconds
Shown as millisecond
redis.search.global_idle
(gauge)
The total number of user and internal cursors currently holding pending results in the shard. Deprecated in 8.0 (split into redis.search.cursors.internal_idle and redis.search.cursors.user_idle) but still available in older versions
redis.search.global_total
(gauge)
The total number of user and internal cursors in the shard, either holding pending results or actively executing FT.CURSOR READ. Deprecated in 8.0 (split into redis.search.cursors.internal_active and redis.search.cursors.user_active), but still available in older versions
redis.search.indexes.active
(gauge)
The total number of indexes running a background indexing and/or background query processing operation. Background indexing refers to vector ingestion process, or in-progress background indexer
redis.search.indexes.active_indexing
(gauge)
The total count of indexes currently undergoing a background indexing process. Background indexing refers to a vector ingestion process, or an in-progress background indexer. This metric is limited by the number of WORKER threads allocated for writing operations plus the number of indexes
redis.search.indexes.running_queries
(gauge)
The total count of indexes currently running a background query process
redis.search.indexes.total
(gauge)
The total number of indexes in the shard
redis.search.indexing.total_time
(gauge)
The total time spent on indexing operations, excluding the background indexing of vectors in the HNSW graph
redis.search.marked_deleted_vectors
(gauge)
The number of vectors marked as deleted in the vector indexes that have not yet been cleaned
redis.search.memory.largest_index
(gauge)
The estimated memory usage of the index with the largest memory usage in the shard in bytes
Shown as byte
redis.search.memory.smallest_index
(gauge)
The estimated memory usage of the index with the smallest memory usage in the shard in bytes
Shown as byte
redis.search.memory.used_indexes
(gauge)
The estimated total memory allocated by all indexes in the shard in bytes (including vector indexes memory accounted in search_used_memory_vector_index)
Shown as byte
redis.search.memory.used_vector_index
(gauge)
The total memory usage of all vector indexes in the shard
Shown as byte
redis.search.queries.active
(gauge)
The total number of background queries currently being executed in the shard, excluding FT.CURSOR READ
redis.search.queries.commands
(gauge)
The total number of successful query command executions (including FT.SEARCH, FT.AGGREGATE, and FT.CURSOR READ)
redis.search.queries.execution_time_ms
(gauge)
The cumulative execution time of all query commands, including FT.SEARCH, FT.AGGREGATE, and FT.CURSOR READ, measured in ms
Shown as millisecond
redis.search.queries.processed
(gauge)
The total number of successful query executions (When using cursors, not counting reading from existing cursors) in the shard
redis.search.total_cycles
(gauge)
The total number of garbage collection cycles executed
redis.search.total_ms_run
(gauge)
The total duration of all garbage collection cycles in the shard, measured in milliseconds
Shown as millisecond
redis.search.write_threads.active
(gauge)
The total count of background write (indexing) processes currently running in the shard. Background indexing refers to a vector ingestion process, or an in-progress background indexer. This metric is limited by the number of threads allocated for writing operations
redis.sentinel.masters
(gauge)
Number of Redis masters monitored by this Sentinel instance
redis.sentinel.running_scripts
(gauge)
The number of scripts this Sentinel is currently executing
redis.sentinel.scripts_queue_length
(gauge)
The length of the queue of user scripts that are pending execution
redis.sentinel.simulate_failure_flags
(gauge)
Flags for the SENTINEL SIMULATE-FAILURE command
redis.sentinel.tilt
(gauge)
A value of 1 means this sentinel is in TILT mode
redis.sentinel.tilt_since_seconds
(gauge)
Duration in seconds of current TILT, or -1 if not TILTed [v7+].
Shown as second
redis.sentinel.total_tilt
(gauge)
The number of times this sentinel has been in TILT mode since running.
redis.server.io_threads_active
(gauge)
Flag indicating if I/O threads are active [v6+].
redis.slowlog.micros.95percentile
(gauge)
The 95th percentile of the duration of queries reported in the slow log.
Shown as microsecond
redis.slowlog.micros.avg
(gauge)
The average duration of queries reported in the slow log.
Shown as microsecond
redis.slowlog.micros.count
(rate)
The rate of queries reported in the slow log.
Shown as query
redis.slowlog.micros.max
(gauge)
The maximum duration of queries reported in the slow log.
Shown as microsecond
redis.slowlog.micros.median
(gauge)
The median duration of queries reported in the slow log.
Shown as microsecond
redis.stats.io_threaded_reads_processed
(gauge)
Number of read events processed by the main and I/O threads [v6+].
redis.stats.io_threaded_writes_processed
(gauge)
Number of write events processed by the main and I/O threads [v6+].
redis.stats.keyspace_hits
(gauge)
The rate of successful lookups in the main db.
Shown as key
redis.stats.keyspace_misses
(gauge)
The rate of missed lookups in the main db.
Shown as key
redis.tracking.clients
(gauge)
Number of clients being tracked
redis.tracking.total_items
(gauge)
Number of items, that is the sum of clients number for each key, that are being tracked
redis.tracking.total_keys
(gauge)
Number of keys being tracked by the server
redis.tracking.total_prefixes
(gauge)
Number of tracked prefixes in server’s prefix table

イベント

Redis チェックには、イベントは含まれません。

サービスチェック

redis.can_connect

Returns CRITICAL if the Agent check is unable to connect to the monitored redis instance. Returns OK otherwise.

Statuses: ok, critical

redis.replication.master_link_status

Returns CRITICAL if this Redis instance is unable to connect to its master instance. Returns OK otherwise.

Statuses: ok, critical

トラブルシューティング

Agent が接続できない

    redisdb
    -------
      - instance #0 [ERROR]: 'Error 111 connecting to localhost:6379. Connection refused.'
      - Collected 0 metrics, 0 events & 1 service check

redisdb.yaml 内の接続情報が正しいかどうかをチェックしてください。

Agent を認証できない

    redisdb
    -------
      - instance #0 [ERROR]: 'NOAUTH Authentication required.'
      - Collected 0 metrics, 0 events & 1 service check

redisdb.yamlpassword を設定してください。

その他の参考資料

お役に立つドキュメント、リンクや記事: