[[getting-watcher-statistics]]
=== Getting Watcher Statistics

You use the Watcher <<api-rest-stats, `stats`>> API to get information about Watcher, such 
as the current state, number of watches, size of the execution queue, and the watches that
are currently queued or executing.  

For example:

[source,js]
--------------------------------------------------
GET _watcher/stats/_all
--------------------------------------------------
// AUTOSENSE

The response looks like this:

[source,js]
--------------------------------------------------
{
   "watcher_state": "started",
   "watch_count": 2,
   "execution_thread_pool": {
      "queue_size": 1,
      "max_size": 40
   },
   "current_watches": [
     {
       "watch_id": "my_watch",
       "watch_record_id": "my_watch4_223-2015-05-21T11:59:59.811Z", 
       "triggered_time": "2015-05-21T11:59:59.811Z",
       "execution_time": "2015-05-21T11:59:59.811Z" 
     }
   ],
   "queued_watches": [
     {
       "watch_id": "my_other_watch",
       "watch_record_id": "my_other_watch4_223-2015-05-21T11:59:59.812Z", 
       "triggered_time": "2015-05-21T11:59:59.812Z", 
       "execution_time": "2015-05-21T11:59:59.812Z" 
     }
   ]
}
--------------------------------------------------

NOTE:   To get the version of the Watcher plugin you have installed, call `GET _watcher`.