stack es helpers watch cli command

Auth required Idempotent Scope: global
elastic stack es helpers watch --index <index> [options]
		

Watch an index for new documents and stream them to stdout as NDJSON.

Behaviour flags:

--dry-run — validate all inputs and exit without performing any action

--index string required
Index or data stream to watch
--query string
Query DSL clause as JSON (wrapped under "query"), e.g. '{"match":{"log.level":"error"}}'
--query-file string
Path to a file containing the full search body JSON
--sort-field string

Field to use for ordering and detecting new documents

Default: @timestamp

--poll-interval number

Polling interval in milliseconds

Default: 5000

--from string
ISO 8601 timestamp to start from (e.g. "2024-01-01T00:00:00Z"). Defaults to the most recent document.
--size number

Maximum documents to fetch per poll

Default: 100

--format string
Output template with {field} placeholders, e.g. "{@timestamp} {message}". Omit for NDJSON (_source as JSON).
--input-file string
path to a JSON file to use as command input
--dry-run
validate all inputs and exit without performing any action (preview changes without applying them)
--no-validate
skip input validation and send the request as-is
--output-fields string
comma-separated list of fields to include in output (dot-notation supported)
--output-template string
Mustache-like template for custom text output (e.g. "{{id}}: {{name}}")
--json

output as JSON