﻿---
title: stack kb synthetics get-synthetic-monitors cli command
description: Get monitors Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4493/reference/elastic-cli/cli/stack/kb/synthetics/get-synthetic-monitors
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb synthetics get-synthetic-monitors cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb synthetics get-synthetic-monitors [options]
```

Get monitors
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--filter string">
    Additional filtering criteria.
  </definition>
  <definition term="--locations string">
    The locations to filter by.
    **Repeatable:** pass `--locations` multiple times to supply more than one value
  </definition>
  <definition term="--monitor-types string">
    The monitor types to filter.
    **Repeatable:** pass `--monitor-types` multiple times to supply more than one value
  </definition>
  <definition term="--page number">
    The page number for paginated results.
  </definition>
  <definition term="--per-page number">
    The number of items to return per page.
  </definition>
  <definition term="--projects string">
    The projects to filter by.
    **Repeatable:** pass `--projects` multiple times to supply more than one value
  </definition>
  <definition term="--query string">
    A free-text query string.
  </definition>
  <definition term="--schedules string">
    The schedules to filter by.
    **Repeatable:** pass `--schedules` multiple times to supply more than one value
  </definition>
  <definition term="--sort-field enum">
    The field to sort the results by.
    **Values:** name, createdAt, updatedAt, status
  </definition>
  <definition term="--sort-order enum">
    The sort order.
    **Values:** asc, desc
  </definition>
  <definition term="--status string">
    The status to filter by.
    **Repeatable:** pass `--status` multiple times to supply more than one value
  </definition>
  <definition term="--tags string">
    Tags to filter monitors.
    **Repeatable:** pass `--tags` multiple times to supply more than one value
  </definition>
  <definition term="--use-logical-and-for string">
    Specifies whether to apply logical AND filtering for specific fields. Accepts either a string with values "tags" or "locations" or an array containing both.
    **Repeatable:** pass `--use-logical-and-for` multiple times to supply more than one value
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
  <definition term="--no-validate">
    skip input validation and send the request as-is
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--output-fields string">
    comma-separated list of fields to include in output (dot-notation supported)
  </definition>
  <definition term="--output-template string">
    Mustache-like template for custom text output (e.g. "{{id}}: {{name}}")
  </definition>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>