Get Watcher statistics

  • GET /_watcher/stats/{metric}
  • GET /_watcher/stats
Auth

This API always returns basic metrics. You retrieve more metrics by using the metric parameter.

Required authorization

Cluster privileges monitor_watcher

Path parameters

metric union enum | enum[] optional

Defines which additional metrics are included in the response.

Supported values include: _all (or all), queued_watches, current_watches, pending_watches

Leave it out to use /_watcher/stats.

Values: _all all queued_watches current_watches pending_watches

Query parameters

emit_stacktraces boolean · default: false

Defines whether stack traces are generated for each watch that is running.

metric union enum | enum[]

Defines which additional metrics are included in the response.

Supported values include: _all (or all), queued_watches, current_watches, pending_watches

Values: _all all queued_watches current_watches pending_watches

Response

application/json
_nodes object required
failures object[]
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as failures in _nodes
root_cause object[]
Same fields as failures in _nodes
suppressed object[]
Same fields as failures in _nodes
total number required

Total number of nodes selected by the request.

successful number required

Number of nodes that responded successfully to the request.

failed number required

Number of nodes that rejected the request or failed to respond. If this value is not 0, a reason for the rejection or failure is included in the response.

cluster_name string required
manually_stopped boolean required
stats object[] required
current_watches object[]

The current executing watches metric gives insight into the watches that are currently being executed by Watcher. Additional information is shared per watch that is currently executing. This information includes the watch_id, the time its execution started and its current execution phase. To include this metric, the metric option should be set to current_watches or _all. In addition you can also specify the emit_stacktraces=true parameter, which adds stack traces for each watch that is being run. These stack traces can give you more insight into an execution of a watch.

execution_time union oneOf required

The time the watch was run. This is just before the input is being run.

One of: string or number
execution_phase enum required

The current watch execution phase.

Values: awaits_execution started input condition actions watch_transform aborted finished
triggered_time union oneOf required

The time the watch was triggered by the trigger engine.

One of: string or number
executed_actions string[]
watch_id string required
watch_record_id string required

The watch record identifier.

execution_thread_pool object required
max_size number required

The largest size of the execution thread pool, which indicates the largest number of concurrent running watches.

queue_size number required

The number of watches that were triggered and are currently queued.

queued_watches object[]

Watcher moderates the execution of watches such that their execution won't put too much pressure on the node and its resources. If too many watches trigger concurrently and there isn't enough capacity to run them all, some of the watches are queued, waiting for the current running watches to finish.s The queued watches metric gives insight on these queued watches.

To include this metric, the metric option should include queued_watches or _all.

execution_time union oneOf required

The time the watch was run. This is just before the input is being run.

One of: string or number
watch_count number required

The number of watches currently registered.

watcher_state enum required

The current state of Watcher.

Values: stopped starting started stopping
node_id string required