{
  "schema_version": 2,
  "id": "operate/rs/references/cli-utilities/rladmin/metrics",
  "title": "rladmin metrics",
  "url": "https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/metrics/",
  "summary": "Configures the metrics stream engine and manages local metrics storage.",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-09-29T16:51:25+03:00",
  "page_type": "content",
  "content_hash": "d3b3921e0d96f22f60360f1d9a87ada6b9a7b41950c42a373da7ae3aff313a56",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Manages the cluster-wide [metrics configuration](https://redis.io/docs/latest/operate/rs/monitoring/metrics_stream_engine/metrics-configuration) for the v2 metrics stream engine, and reports on and controls [local metrics storage](https://redis.io/docs/latest/operate/rs/monitoring/metrics_stream_engine/local-metrics-storage) on each node."
    },
    {
      "id": "metrics-config",
      "title": "`metrics config`",
      "role": "content",
      "text": "Updates the cluster's metrics configuration. Specify one or more field/value pairs; at least one pair is required.\n\n[code example]\n\nTo view the current configuration, use [`rladmin info metrics`](https://redis.io/docs/latest/operate/rs/references/cli-utilities/rladmin/info#info-metrics)."
    },
    {
      "id": "parameters",
      "title": "Parameters",
      "role": "parameters",
      "text": "For the available fields and their types, defaults, and validation, see the [metrics configuration object](https://redis.io/docs/latest/operate/rs/references/rest-api/objects/metrics_config).\n\nOn the command line, boolean fields take `enabled` or `disabled`, list fields take a comma-separated set of values, and an empty value (`\"\"`) clears a list field."
    },
    {
      "id": "returns",
      "title": "Returns",
      "role": "returns",
      "text": "Returns a confirmation message when the update succeeds."
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "metrics-status",
      "title": "`metrics status`",
      "role": "content",
      "text": "Shows the status of local metrics storage on all nodes or on a specific node.\n\n[code example]"
    },
    {
      "id": "parameters-1",
      "title": "Parameters",
      "role": "parameters",
      "text": "| Parameter | Type/Value | Description |\n|-----------|------------|-------------|\n| node | integer | Shows the status of the specified node only. If omitted, shows all nodes. |"
    },
    {
      "id": "returns-1",
      "title": "Returns",
      "role": "returns",
      "text": "Returns each node's store state, disk usage against the configured maximum, configured and effective retention, the date range of stored data, and health."
    },
    {
      "id": "example-1",
      "title": "Example",
      "role": "example",
      "text": "[code example]\n\n[code example]"
    },
    {
      "id": "metrics-granular-start",
      "title": "`metrics granular start`",
      "role": "content",
      "text": "Starts granular metrics collection on all nodes or on a specific node. Collection stops automatically after the maximum duration set in [`granular_metrics_job_settings`](https://redis.io/docs/latest/operate/rs/references/rest-api/objects/job_scheduler/granular_metrics_job_settings).\n\n[code example]"
    },
    {
      "id": "parameters-2",
      "title": "Parameters",
      "role": "parameters",
      "text": "| Parameter | Type/Value | Description |\n|-----------|------------|-------------|\n| node | integer | Starts collection on the specified node only. If omitted, starts collection on all nodes. |"
    },
    {
      "id": "returns-2",
      "title": "Returns",
      "role": "returns",
      "text": "Returns the result for each node: `started`, `already running`, or `unknown`. If the result is `unknown`, run `rladmin metrics granular status node <uid>` to confirm it."
    },
    {
      "id": "example-2",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "metrics-granular-stop",
      "title": "`metrics granular stop`",
      "role": "content",
      "text": "Stops granular metrics collection on all nodes or on a specific node. The collected data stays on disk until you [delete it](#metrics-granular-cleanup) or the cleanup delay set in [`granular_metrics_job_settings`](https://redis.io/docs/latest/operate/rs/references/rest-api/objects/job_scheduler/granular_metrics_job_settings) passes.\n\n[code example]"
    },
    {
      "id": "parameters-3",
      "title": "Parameters",
      "role": "parameters",
      "text": "| Parameter | Type/Value | Description |\n|-----------|------------|-------------|\n| node | integer | Stops collection on the specified node only. If omitted, stops collection on all nodes. |"
    },
    {
      "id": "returns-3",
      "title": "Returns",
      "role": "returns",
      "text": "Returns the result for each node: `stopped` or `already stopped`."
    },
    {
      "id": "example-3",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "metrics-granular-status",
      "title": "`metrics granular status`",
      "role": "content",
      "text": "Shows the granular metrics collection status of all nodes or of a specific node.\n\n[code example]"
    },
    {
      "id": "parameters-4",
      "title": "Parameters",
      "role": "parameters",
      "text": "| Parameter | Type/Value | Description |\n|-----------|------------|-------------|\n| node | integer | Shows the status of the specified node only. If omitted, shows all nodes. |"
    },
    {
      "id": "returns-4",
      "title": "Returns",
      "role": "returns",
      "text": "Returns each node's collection state and disk usage. For a running node, it shows when collection started and when it expires. For a stopped node, it shows when collection stopped and when the data is cleaned up."
    },
    {
      "id": "example-4",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "metrics-granular-cleanup",
      "title": "`metrics granular cleanup`",
      "role": "content",
      "text": "Deletes granular metrics data from all nodes or from a specific node.\n\n[code example]\n\nIf granular collection is still running on any node in scope, the command fails and deletes nothing. Stop collection with [`rladmin metrics granular stop`](#metrics-granular-stop) first."
    },
    {
      "id": "parameters-5",
      "title": "Parameters",
      "role": "parameters",
      "text": "| Parameter | Type/Value | Description |\n|-----------|------------|-------------|\n| node | integer | Deletes granular data from the specified node only. If omitted, deletes granular data from all nodes. |"
    },
    {
      "id": "returns-5",
      "title": "Returns",
      "role": "returns",
      "text": "Returns the result for each node. If collection is still running on any node in scope, returns an error that lists those nodes."
    },
    {
      "id": "example-5",
      "title": "Example",
      "role": "example",
      "text": "The following command fails because collection is still running on node 1:\n\n[code example]"
    }
  ],
  "examples": [
    {
      "id": "metrics-config-ex0",
      "language": "sh",
      "code": "rladmin metrics config <field> <value> [ <field> <value> ... ]",
      "section_id": "metrics-config"
    },
    {
      "id": "example-ex0",
      "language": "sh",
      "code": "$ rladmin metrics config expose_db_tags enabled metrics_tag_keys_exposed env,team\nMetrics configuration updated successfully",
      "section_id": "example"
    },
    {
      "id": "metrics-status-ex0",
      "language": "sh",
      "code": "rladmin metrics status [ node <uid> ]",
      "section_id": "metrics-status"
    },
    {
      "id": "example-1-ex0",
      "language": "sh",
      "code": "$ rladmin metrics status\nMETRICS STORE:\nNODE  STATE     DISK USAGE              RETENTION       DATA RANGE                  HEALTH\n1     running   450MB / 1.0GB (44%)     8d (eff 6d)     2026-02-15 to 2026-02-23    ok\n2     running   512MB / 1.0GB (50%)     8d (eff 6d)     2026-02-15 to 2026-02-23    ok\n3     stopped   -                       8d              -                           -",
      "section_id": "example-1"
    },
    {
      "id": "example-1-ex1",
      "language": "sh",
      "code": "$ rladmin metrics status node 1\nMetrics Store Status:\n  Node:             1\n  State:            running\n  Disk usage:       450MB / 1.0GB (44%)\n  Retention:        8 days (effective: 6 days)\n  Data range:       2026-02-15 to 2026-02-23\n  Health:           ok",
      "section_id": "example-1"
    },
    {
      "id": "metrics-granular-start-ex0",
      "language": "sh",
      "code": "rladmin metrics granular start [ node <uid> ]",
      "section_id": "metrics-granular-start"
    },
    {
      "id": "example-2-ex0",
      "language": "sh",
      "code": "$ rladmin metrics granular start\nStarting granular metrics:\n  - node:1: started (expires at 2026-02-22 15:30:00)\n  - node:2: already running (started at 2026-02-22 14:32:05, expires at 2026-02-22 15:32:05)\n  - node:4: unknown (could not reach node — retry 'rladmin metrics granular status node 4' to confirm)",
      "section_id": "example-2"
    },
    {
      "id": "metrics-granular-stop-ex0",
      "language": "sh",
      "code": "rladmin metrics granular stop [ node <uid> ]",
      "section_id": "metrics-granular-stop"
    },
    {
      "id": "example-3-ex0",
      "language": "sh",
      "code": "$ rladmin metrics granular stop\nStopping granular metrics:\n  - node:1: stopped (ran for 45m, stopped at 2026-02-22 14:45:00)\n  - node:2: already stopped",
      "section_id": "example-3"
    },
    {
      "id": "metrics-granular-status-ex0",
      "language": "sh",
      "code": "rladmin metrics granular status [ node <uid> ]",
      "section_id": "metrics-granular-status"
    },
    {
      "id": "example-4-ex0",
      "language": "sh",
      "code": "$ rladmin metrics granular status\nGRANULAR METRICS:\nNODE  STATE    STARTED              STOPPED              EXPIRES/CLEANUP    DISK\n1     running  2026-02-22 14:30:00  -                    expires in 47m     125MB\n2     stopped  -                    2026-02-22 14:30:00  cleanup in 23h     125MB",
      "section_id": "example-4"
    },
    {
      "id": "metrics-granular-cleanup-ex0",
      "language": "sh",
      "code": "rladmin metrics granular cleanup [ node <uid> ]",
      "section_id": "metrics-granular-cleanup"
    },
    {
      "id": "example-5-ex0",
      "language": "sh",
      "code": "$ rladmin metrics granular cleanup\nerror: cannot cleanup granular metrics — still running on 1 node:\n  - node:1 (started 2026-02-22 14:30:00, 47m ago)\nhint: stop these nodes first ('rladmin metrics granular stop' or 'rladmin metrics granular stop node <uid>').",
      "section_id": "example-5"
    }
  ]
}
