This API always returns basic metrics. You retrieve more metrics by using the metric parameter. ##Required authorization
- Cluster privileges:
monitor_watcher
Path parameters
-
Defines which additional metrics are included in the response.
Values are
_all,all,queued_watches,current_watches, orpending_watches.
GET
/_watcher/stats/{metric}
Console
GET _watcher/stats
curl \
--request GET 'http://api.example.com/_watcher/stats/{metric}'
Response examples (200)
Basic metrics
A successful response from `GET _watcher/stats`.
{
"watcher_state": "started",
"watch_count": 1,
"execution_thread_pool": {
"size": 1000,
"max_size": 1
}
}
A successful response from `GET _watcher/stats?metric=current_watches`.
{
"watcher_state": "started",
"watch_count": 2,
"execution_thread_pool": {
"queue_size": 1000,
"max_size": 20
},
"current_watches": [
{
"watch_id": "slow_condition",
"watch_record_id": "slow_condition_3-2015-05-13T07:42:32.179Z",
"triggered_time": "2015-05-12T11:53:51.800Z",
"execution_time": "2015-05-13T07:42:32.179Z",
"execution_phase": "condition"
}
]
}
An abbreviated response from `GET _watcher/stats/queued_watches`.
{
"watcher_state": "started",
"watch_count": 10,
"execution_thread_pool": {
"queue_size": 1000,
"max_size": 20
},
"queued_watches": [
{
"watch_id": "slow_condition4",
"watch_record_id": "slow_condition4_223-2015-05-21T11:59:59.811Z",
"triggered_time": "2015-05-21T11:59:59.811Z",
"execution_time": "2015-05-21T11:59:59.811Z"
}
]
}