{
  "schema_version": 2,
  "id": "integrate/redis-data-integration/reference/cli/redis-di-get-metric-collection",
  "title": "redis-di get-metric-collection",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-get-metric-collection/",
  "summary": "Gets a metric collection of a pipeline",
  "tags": [
    "redis-di"
  ],
  "last_updated": "2026-09-18T16:41:35+01:00",
  "page_type": "content",
  "content_hash": "aa77a90ed7a9525876ff15d8b04cfecc4134a0d70cf9f7ed200cedd7c89d8ad8",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Gets a single metric collection of a pipeline, returning its raw metric data. This command is most\nuseful with `-o json` or `-o yaml` for scripting and for tools such as `jq`. Use\n[`list-metric-collections`](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di-list-metric-collections)\nto see the available collections."
    },
    {
      "id": "usage",
      "title": "Usage",
      "role": "syntax",
      "text": "[code example]"
    },
    {
      "id": "options",
      "title": "Options",
      "role": "parameters",
      "text": "| Option             | Description                                          |\n| :----------------- | :--------------------------------------------------- |\n| `-p`, `--pipeline` | Pipeline to target (default `default`).              |\n| `-o`, `--output`   | Output format: `table` (default), `json`, or `yaml`. |\n\nThis command also accepts the\n[global options](https://redis.io/docs/latest/integrate/redis-data-integration/reference/cli/redis-di#global-options)."
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    }
  ],
  "examples": [
    {
      "id": "usage-ex0",
      "language": "plaintext",
      "code": "redis-di get-metric-collection <name> [flags]",
      "section_id": "usage"
    },
    {
      "id": "example-ex0",
      "language": "bash",
      "code": "redis-di get-metric-collection processor_metrics -o json\nredis-di get-metric-collection collector-mysql_metrics -o json",
      "section_id": "example"
    }
  ]
}
