Get Watcher statistics
- GET /_watcher/stats/{metric}
- GET /_watcher/stats
This API always returns basic metrics. You retrieve more metrics by using the metric parameter.
Required authorization
- Cluster privileges monitor_watcher
Response
-
statsobjectrequired -
current_watchesobject -
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, themetricoption should be set tocurrent_watchesor_all. In addition you can also specify theemit_stacktraces=trueparameter, 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. -
queued_watchesobject -
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
metricoption should includequeued_watchesor_all.