﻿---
title: stack kb synthetics get-synthetic-monitors cli command
description: Search monitors Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4948/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]
```

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

## Options

<definitions>
  <definition term="--query string">
    A free-text query string.
  </definition>
  <definition term="--filter string">
    Additional KQL filtering criteria.
  </definition>
  <definition term="--tags string[]">
    Tags to filter monitors. Accepts a string or an array of strings.
    **Repeatable:** pass `--tags` multiple times to supply more than one value
  </definition>
  <definition term="--monitor-types string[]">
    The monitor types to filter by, such as `http`. Accepts a string or an array of strings.
    **Repeatable:** pass `--monitor-types` multiple times to supply more than one value
  </definition>
  <definition term="--locations string[]">
    The location IDs to filter by. Accepts a string or an array of strings.
    **Repeatable:** pass `--locations` multiple times to supply more than one value
  </definition>
  <definition term="--projects string[]">
    The projects to filter by. Accepts a string or an array of strings.
    **Repeatable:** pass `--projects` multiple times to supply more than one value
  </definition>
  <definition term="--schedules string[]">
    The schedules to filter by. Accepts a string or an array of strings.
    **Repeatable:** pass `--schedules` multiple times to supply more than one value
  </definition>
  <definition term="--remote-names string[]">
    A string or an array of strings.
    **Repeatable:** pass `--remote-names` multiple times to supply more than one value
  </definition>
  <definition term="--status string[]">
    The monitor statuses to filter by. Accepts a string or an array of strings.
    **Repeatable:** pass `--status` multiple times to supply more than one value
  </definition>
  <definition term="--monitor-query-ids string[]">
    The monitor query IDs to filter by. Accepts a string or an array of strings.
    **Repeatable:** pass `--monitor-query-ids` multiple times to supply more than one value
  </definition>
  <definition term="--config-ids string[]">
    The monitor config IDs to filter by. Accepts a string or an array of strings.
    **Repeatable:** pass `--config-ids` multiple times to supply more than one value
  </definition>
  <definition term="--show-from-all-spaces enum">
    If `true`, return monitors from all spaces the user can access.
    **Values:** true, false
  </definition>
  <definition term="--use-logical-and-for string[]">
    Apply logical AND for `tags` and/or `locations`. Accepts a string or an array.
    **Repeatable:** pass `--use-logical-and-for` multiple times to supply more than one value
  </definition>
  <definition term="--date-range-start string">
    The start of the status window, as datemath (`now-15m`) or an ISO-8601 timestamp.
  </definition>
  <definition term="--date-range-end string">
    The end of the status window, as datemath (`now`) or an ISO-8601 timestamp.
  </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="--sort-field enum">
    The field to sort the results by.
    **Values:** enabled, status, updated_at, created_at, urls, name, tags, project_id, type, schedule, journey_id
  </definition>
  <definition term="--sort-order enum">
    The sort order.
    **Values:** desc, asc
  </definition>
  <definition term="--search-after string[]">
    A JSON array of sort values from the previous page, for cursor-based paging.
    **Repeatable:** pass `--search-after` 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>