summaryrefslogtreecommitdiff
path: root/rest-api-spec/src
diff options
context:
space:
mode:
authorColin Goodheart-Smithe <colings86@users.noreply.github.com>2017-06-02 08:46:38 +0100
committerGitHub <noreply@github.com>2017-06-02 08:46:38 +0100
commit779fb9a1c03af185c276599a14a85eaa3b1fb17b (patch)
tree55ac6c98ef1bb41fd2b212da7c987373867f2120 /rest-api-spec/src
parent528bd25fa704da1d234ed364503891c93c6b9d31 (diff)
Adds nodes usage API to monitor usages of actions (#24169)
* Adds nodes usage API to monitor usages of actions The nodes usage API has 2 main endpoints /_nodes/usage and /_nodes/{nodeIds}/usage return the usage statistics for all nodes and the specified node(s) respectively. At the moment only one type of usage statistics is available, the REST actions usage. This records the number of times each REST action class is called and when the nodes usage api is called will return a map of rest action class name to long representing the number of times each of the action classes has been called. Still to do: * [x] Create usage service to store usage statistics * [x] Record usage in REST layer * [x] Add Transport Actions * [x] Add REST Actions * [x] Tests * [x] Documentation * Rafactors UsageService so counts are done by the handlers * Fixing up docs tests * Adds a name to all rest actions * Addresses review comments
Diffstat (limited to 'rest-api-spec/src')
-rw-r--r--rest-api-spec/src/main/resources/rest-api-spec/api/nodes.usage.json38
1 files changed, 38 insertions, 0 deletions
diff --git a/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.usage.json b/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.usage.json
new file mode 100644
index 0000000000..b066a01055
--- /dev/null
+++ b/rest-api-spec/src/main/resources/rest-api-spec/api/nodes.usage.json
@@ -0,0 +1,38 @@
+{
+ "nodes.usage": {
+ "documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html",
+ "methods": ["GET"],
+ "url": {
+ "path": "/_nodes/usage",
+ "paths": [
+ "/_nodes/usage",
+ "/_nodes/{node_id}/usage",
+ "/_nodes/usage/{metric}",
+ "/_nodes/{node_id}/usage/{metric}"
+ ],
+ "parts": {
+ "metric" : {
+ "type" : "list",
+ "options" : ["_all", "rest_actions"],
+ "description" : "Limit the information returned to the specified metrics"
+ },
+ "node_id": {
+ "type" : "list",
+ "description" : "A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
+ }
+ },
+ "params": {
+ "human": {
+ "type": "boolean",
+ "description": "Whether to return time and byte values in human-readable format.",
+ "default": false
+ },
+ "timeout": {
+ "type" : "time",
+ "description" : "Explicit operation timeout"
+ }
+ }
+ },
+ "body": null
+ }
+} \ No newline at end of file