{
  "schema_version": 2,
  "id": "operate/rs/clusters/logging/diagnostic-logging",
  "title": "Diagnostic logging",
  "url": "https://redis.io/docs/latest/operate/rs/clusters/logging/diagnostic-logging/",
  "summary": "Diagnostic logs can help troubleshoot Redis Software.",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-09-24T10:14:16+01:00",
  "page_type": "content",
  "content_hash": "28eb0639e1ea02cc1193742c9b08eafa4a3fe9b06455d16a8bfca67e857d0920",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "The diagnostic logging service collects detailed system logs, which you can use to troubleshoot Redis Software."
    },
    {
      "id": "view-diagnostic-logs",
      "title": "View diagnostic logs",
      "role": "content",
      "text": "Diagnostic logs are collected at scheduled intervals and saved in the `/var/opt/redislabs/log/diagnostics/` directory. Each diagnostic log file is overwritten with the new data at the scheduled collection interval."
    },
    {
      "id": "view-log-collector-settings",
      "title": "View log collector settings",
      "role": "content",
      "text": "To view the current log collection schedule and parameters for each log collector, use the REST API to [get the diagnostic logging service configuration](https://redis.io/docs/latest/operate/rs/references/rest-api/requests/diagnostics#get-diagnostics).\n\n[code example]\n\nExample response:\n\n[code example]"
    },
    {
      "id": "change-log-collector-settings",
      "title": "Change log collector settings",
      "role": "content",
      "text": "To change how often a log is collected, set the `cron_expression` when you [update the diagnostic logging service configuration](https://redis.io/docs/latest/operate/rs/references/rest-api/requests/diagnostics#put-diagnostics) with the REST API.\n\n[code example]\n\n- Replace `<log_collector>` with the name of the log collector you want to turn off.\n\n- Use standard [cron syntax](https://en.wikipedia.org/wiki/Cron) to set the collection interval in the `cron_expression`.\n\nFor the slowlog collector only, you can also set `max_entries` to change the maximum number of slow log entries to collect:\n\n[code example]"
    },
    {
      "id": "turn-off-log-collectors",
      "title": "Turn off log collectors",
      "role": "content",
      "text": "To turn off a log collector, set its `cron_expression` to an empty string when you [update the diagnostic logging service configuration](https://redis.io/docs/latest/operate/rs/references/rest-api/requests/diagnostics#put-diagnostics) with the REST API.\n\n[code example]\n\nReplace `<log_collector>` with the name of the log collector you want to turn off."
    },
    {
      "id": "log-collectors",
      "title": "Log collectors",
      "role": "content",
      "text": "Each log collector runs independently and writes a separate log file. The following table describes the log collectors.\n\nDefault `cron_expression` values:\n\n- `*/10 * * * *`: Logs are collected every 10 minutes.\n\n- `*/30 * * * *`: Logs are collected every 30 minutes.\n\n| Log collector | Description |\n|---------------|-------------|\n| bdb | Logs database metadata similar to [`GET /bdbs`](https://redis.io/docs/latest/operate/rs/references/rest-api/requests/bdbs). Each entry is in JSON format.<br />Default settings:<br />\"cron_expression\": \"*/10 * * * *\" |\n| bdb_client_list | Logs database client lists, with a separate file for each database. Each entry is in JSON format.<br />Default settings:<br />\"cron_expression\": \"*/10 * * * *\" |\n| bdb_info | Logs the result of running [`INFO ALL`](https://redis.io/docs/latest/commands/info) on a database, excluding `commandstats`, with a separate file for each database. Each entry is in JSON format.<br />Default settings:<br />\"cron_expression\": \"*/10 * * * *\" |\n| command_stats | Logs [`INFO commandstats`](https://redis.io/docs/latest/commands/info) for each database, with a separate file for each database. Each entry is in JSON format.<br />Default settings:<br />\"cron_expression\": \"*/30 * * * *\" |\n| network_stats | Logs the node's network statistics.<br />Default settings:<br />\"cron_expression\": \"*/30 * * * *\" |\n| persistent_files | Lists persistent files from `/var/opt/redislabs/persist/redis`<br />Default settings:<br />\"cron_expression\": \"*/10 * * * *\" |\n| rladmin_status | Logs data about nodes, databases, endpoints, and shards from [`rladmin status`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/status). Each entry is in JSON format.<br />Default settings:<br />\"cron_expression\": \"*/10 * * * *\" |\n| shard | Logs shard status similar to [`GET /shards`](https://redis.io/docs/latest/operate/rs/references/rest-api/requests/shards). Each entry is in JSON format.<br />Default settings:<br />\"cron_expression\": \"*/10 * * * *\" |\n| shard_info | Logs the result of running [INFO ALL](https://redis.io/docs/latest/commands/info) on a shard, with a separate file for each shard. Each entry is in JSON format.<br />Default settings:<br />\"cron_expression\": \"*/10 * * * *\" |\n| shard_latency | Logs the result of running [`latency latest`](https://redis.io/docs/latest/commands/latency-latest) on a shard, with a separate file for each shard.<br />Default settings:<br />\"cron_expression\": \"*/10 * * * *\" |\n| <span class=\"break-all\">`shard_latency_histogram`</span> | Logs the result of running [`latency histogram`](https://redis.io/docs/latest/commands/latency-histogram) on a shard, with a separate file for each shard.<br />Default settings:<br />\"cron_expression\": \"*/10 * * * *\" |\n| slowlog | Logs slow commands from the databases using [`SLOWLOG GET`](https://redis.io/docs/latest/commands/slowlog-get), with a separate file for each database. Each entry is in JSON format. The log is sanitized, only the commands are visible.<br />Default settings:<br />\"cron_expression\": \"*/10 * * * *\",<br />\"max_entries\": 100 |\n| socket_files | Lists socket files used by Redis Software.<br />Default settings:<br />\"cron_expression\": \"*/10 * * * *\" |"
    }
  ],
  "examples": [
    {
      "id": "view-log-collector-settings-ex0",
      "language": "sh",
      "code": "GET /v1/diagnostics",
      "section_id": "view-log-collector-settings"
    },
    {
      "id": "view-log-collector-settings-ex1",
      "language": "json",
      "code": "{\n    \"bdb_client_list_target\": {\n        \"cron_expression\": \"*/10 * * * *\"\n    },\n    \"bdb_info_target\": {\n        \"cron_expression\": \"*/10 * * * *\"\n    },\n    \"bdb_target\": {\n        \"cron_expression\": \"*/10 * * * *\"\n    },\n    \"command_stats_target\": {\n        \"cron_expression\": \"*/30 * * * *\"\n    },\n    \"network_stats_target\": {\n        \"cron_expression\": \"*/30 * * * *\"\n    },\n    \"persistent_files_target\": {\n        \"cron_expression\": \"*/10 * * * *\"\n    },\n    \"rladmin_status_target\": {\n        \"cron_expression\": \"*/10 * * * *\"\n    },\n    \"shard_info_target\": {\n        \"cron_expression\": \"*/10 * * * *\"\n    },\n    \"shard_latency_histogram_target\": {\n        \"cron_expression\": \"*/10 * * * *\"\n    },\n    \"shard_latency_target\": {\n        \"cron_expression\": \"*/10 * * * *\"\n    },\n    \"shard_target\": {\n        \"cron_expression\": \"*/10 * * * *\"\n    },\n    \"slowlog_target\": {\n        \"cron_expression\": \"*/10 * * * *\",\n        \"max_entries\": 100\n    },\n    \"socket_files_target\": {\n        \"cron_expression\": \"*/10 * * * *\"\n    }\n}",
      "section_id": "view-log-collector-settings"
    },
    {
      "id": "change-log-collector-settings-ex0",
      "language": "sh",
      "code": "PUT /v1/diagnostics\n{\n  \"<log_collector>_target\": {\n    \"cron_expression\": \"*/5 * * * *\"\n  }\n}",
      "section_id": "change-log-collector-settings"
    },
    {
      "id": "change-log-collector-settings-ex1",
      "language": "sh",
      "code": "PUT /v1/diagnostics\n{\n  \"slowlog_target\": {\n    \"cron_expression\": \"*/5 * * * *\",\n    \"max_entries\": 200\n  }\n}",
      "section_id": "change-log-collector-settings"
    },
    {
      "id": "turn-off-log-collectors-ex0",
      "language": "sh",
      "code": "PUT /v1/diagnostics\n{\n  \"<log_collector>_target\": {\n    \"cron_expression\": \"\"\n  }\n}",
      "section_id": "turn-off-log-collectors"
    }
  ]
}
