-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add repositories metering API #60371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
3e77c52
fc7ca20
528da9a
fcc15c8
f71fabb
767edd6
20a1dfe
02c5d93
a3ce634
158ad06
b4bb846
81b2bf7
d0a5995
278eaa7
d8aea38
7e4ab0c
47c18fa
d7020cb
ddc2cc1
1f93514
fdce53f
ee0c47b
2374fd1
449069a
413472a
bc94df1
e53322b
1b79828
79cb0f1
f9fa369
c3a1f3a
d142589
bbc23c1
a7b2ef8
b97f5f3
6df2755
3e2752b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| [[clear-repositories-stats-archive-api]] | ||
| === Clear repositories statistics archive API | ||
| ++++ | ||
| <titleabbrev>Clear repositories statistics archive API</titleabbrev> | ||
| ++++ | ||
|
|
||
| Removes the archived repositories statistics in the cluster. | ||
|
|
||
| [[clear-repositories-stats-archive-api-request]] | ||
| ==== {api-request-title} | ||
|
|
||
| `DELETE /_nodes/<node_id>/_repositories_stats` | ||
|
||
|
|
||
| [[clear-repositories-stats-archive-api-desc]] | ||
| ==== {api-description-title} | ||
|
|
||
| You can clear the archived repositories utilization statistics using this API. | ||
|
|
||
| All the nodes selective options are explained <<cluster-nodes,here>>. | ||
|
|
||
| [[clear-repositories-stats-archive-api-path-params]] | ||
| ==== {api-path-parms-title} | ||
|
|
||
| include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=node-id] | ||
|
|
||
| [[clear-repositories-stats-archive-api-query-params]] | ||
| ==== {api-query-parms-title} | ||
|
|
||
| [role="child_attributes"] | ||
| [[clear-repositories-stats-archive-api-response-body]] | ||
| ==== {api-response-body-title} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| [[get-repositories-stats-api]] | ||
| === Repositories statistics API | ||
fcofdez marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ++++ | ||
| <titleabbrev>Repositories statistics</titleabbrev> | ||
| ++++ | ||
|
|
||
| Returns cluster repositories utilization statistics. | ||
|
|
||
| [[get-repositories-stats-api-request]] | ||
| ==== {api-request-title} | ||
|
|
||
| `GET /_nodes/<node_id>/_repositories_stats` | ||
|
|
||
| [[get-repositories-stats-api-desc]] | ||
| ==== {api-description-title} | ||
|
|
||
| You can use the cluster repositories statistics API to retrieve repository utilization statistics in a cluster. | ||
|
|
||
|
|
||
| All the nodes selective options are explained <<cluster-nodes,here>>. | ||
|
|
||
| [[get-repositories-stats-api-path-params]] | ||
| ==== {api-path-parms-title} | ||
|
|
||
| include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=node-id] | ||
|
|
||
| [[get-repositories-stats-api-query-params]] | ||
| ==== {api-query-parms-title} | ||
|
|
||
| [role="child_attributes"] | ||
| [[get-repositories-stats-api-response-body]] | ||
| ==== {api-response-body-title} | ||
|
|
||
| `_nodes`:: | ||
| (object) | ||
| Contains statistics about the number of nodes selected by the request. | ||
| + | ||
| .Properties of `_nodes` | ||
| [%collapsible%open] | ||
| ==== | ||
| `total`:: | ||
| (integer) | ||
| Total number of nodes selected by the request. | ||
|
|
||
| `successful`:: | ||
| (integer) | ||
| Number of nodes that responded successfully to the request. | ||
|
|
||
| `failed`:: | ||
| (integer) | ||
| 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) | ||
| Name of the cluster. Based on the <<cluster.name>> setting. | ||
|
|
||
| `nodes`:: | ||
original-brownbear marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| (object) | ||
| Contains repository utilization statistics for the nodes selected by the request. | ||
| + | ||
| .Properties of `nodes` | ||
| [%collapsible%open] | ||
| ==== | ||
| `<node_id>`:: | ||
| (array) | ||
| An array of repository utilization statistics for the node. | ||
| + | ||
| .Properties of objects in `node_id` | ||
| [%collapsible%open] | ||
| ===== | ||
| `repository_name`:: | ||
| (string) | ||
| Repository name. | ||
|
|
||
| `repository_type`:: | ||
| (string) | ||
| Repository type. | ||
|
|
||
| `repository_location`:: | ||
| (string) | ||
| Represents an unique location within the repository, | ||
| i.e. a `bucket` + `base_path`. | ||
|
|
||
| `repository_ephemeral_id`:: | ||
| (string) | ||
| An identifier that changes every time the repository is updated. | ||
|
|
||
| `repository_started_at`:: | ||
| (long) | ||
| Time the repository was created or updated. Recorded in milliseconds | ||
| since the https://en.wikipedia.org/wiki/Unix_time[Unix Epoch]. | ||
|
|
||
| `repository_stopped_at`:: | ||
| (long) | ||
| Time the repository was deleted or updated. Recorded in milliseconds | ||
| since the https://en.wikipedia.org/wiki/Unix_time[Unix Epoch]. | ||
|
|
||
| `request_counts`:: | ||
| (object) | ||
| An object with the number of request performed against the repository | ||
| grouped by request type. | ||
| + | ||
| .Properties of `request_counts` for repository type `Azure` | ||
| [%collapsible%open] | ||
| ====== | ||
| `HEAD`:: | ||
| (long) Number of https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties[Get Blob Properties] requests. | ||
| `GET`:: | ||
| (long) Number of https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob[Get Blob] requests. | ||
| `PUT`:: | ||
| (long) Number of https://docs.microsoft.com/en-us/rest/api/storageservices/put-blob[Put Blob] requests. | ||
| ====== | ||
| + | ||
| .Properties of `request_counts` for repository type `GCP` | ||
| [%collapsible%open] | ||
| ====== | ||
| `GET`:: | ||
| (long) Number of https://cloud.google.com/storage/docs/json_api/v1/objects/get[GET] requests. | ||
| `LIST`:: | ||
| (long) Number of https://cloud.google.com/storage/docs/json_api/v1/objects/list[LIST] requests. | ||
| `PUT`:: | ||
| (long) Number of https://cloud.google.com/storage/docs/performing-resumable-uploads[PUT] requests. | ||
| `POST`:: | ||
| (long) Number of https://cloud.google.com/storage/docs/json_api/v1/objects/insert[POST] requests. | ||
| ====== | ||
| + | ||
| .Properties of `request_counts` for repository type `S3` | ||
| [%collapsible%open] | ||
| ====== | ||
| `GET`:: | ||
| (long) Number of https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html[GET] requests. | ||
| `LIST`:: | ||
| (long) Number of https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html[LIST] requests. | ||
| `PUT`:: | ||
| (long) Number of https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html[PUT] requests. | ||
| `POST`:: | ||
| (long) Number of https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html[MultiPart] requests. | ||
| ====== | ||
| ===== | ||
| ==== | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| [[repositories-stats-apis]] | ||
| == Repositories utilization statistics APIs | ||
|
|
||
| experimental[] | ||
|
|
||
| You can use the following APIs to retrieve statistics about the repositories utilization. | ||
|
|
||
| * <<get-repositories-stats-api,Get repositories utilization statisticss>> | ||
| * <<clear-repositories-stats-archive-api,Clear repositories utilization statistics archive>> | ||
|
|
||
| include::get-repositories-stats.asciidoc[] | ||
| include::clear-repositories-stats-archive.asciidoc[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized :) Do we actually want to publicly document this API? If so I think we should make it very clear that this API is not supported/stable (regardless of what kind of stability we might offer here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can state that this API is not stable and can suffer changes, I think it can be useful for consumers of this API to have the information at hand. But I'm not sure what's our policy here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, we can just put on the "experimental tag", and mark the license as basic.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also add a header that this is an API meant to be used by Elastic's commercial offerings, to avoid any confusion.