-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-enable deprecated _xpack/monitoring routes via REST compatibility (#…
- Loading branch information
Showing
3 changed files
with
87 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
x-pack/plugin/src/yamlRestCompatTest/resources/rest-api-spec/api/xpack-monitoring.bulk.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"xpack-monitoring.bulk":{ | ||
"documentation":{ | ||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/monitor-elasticsearch-cluster.html", | ||
"description":"Used by the monitoring features to send monitoring data." | ||
}, | ||
"stability":"experimental", | ||
"visibility":"public", | ||
"headers":{ | ||
"accept": [ "application/vnd.elasticsearch+json;compatible-with=7"], | ||
"content_type": ["application/x-ndjson;compatible-with=7"] | ||
}, | ||
"url":{ | ||
"paths":[ | ||
{ | ||
"path":"/_xpack/monitoring/_bulk", | ||
"methods":[ | ||
"POST", | ||
"PUT" | ||
], | ||
"deprecated":{ | ||
"version":"7.0.0", | ||
"description":"all _xpack prefix have been deprecated" | ||
} | ||
} | ||
] | ||
}, | ||
"params":{ | ||
"system_id":{ | ||
"type":"string", | ||
"description":"Identifier of the monitored system" | ||
}, | ||
"system_api_version":{ | ||
"type":"string", | ||
"description":"API Version of the monitored system" | ||
}, | ||
"interval":{ | ||
"type":"string", | ||
"description":"Collection interval (e.g., '10s' or '10000ms') of the payload" | ||
} | ||
}, | ||
"body":{ | ||
"description":"The operation definition and data (action-data pairs), separated by newlines", | ||
"required":true, | ||
"serialize":"bulk" | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...lRestCompatTest/resources/rest-api-spec/test/v7compat/monitoring/bulk/10_basic_compat.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
setup: | ||
- skip: | ||
version: "9.0.0 - " | ||
reason: "compatible from 8.x to 7.x" | ||
features: | ||
- "headers" | ||
- "warnings" | ||
|
||
--- | ||
"Bulk indexing of monitoring data": | ||
|
||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
xpack-monitoring.bulk: | ||
system_id: "kibana" | ||
system_api_version: "6" | ||
interval: "10s" | ||
body: | ||
- index: | ||
_type: test_type | ||
- avg-cpu: | ||
user: 13.26 | ||
nice: 0.17 | ||
system: 1.51 | ||
iowait: 0.85 | ||
idle: 84.20 | ||
warnings: | ||
- "[POST /_xpack/monitoring/_bulk] is deprecated! Use [POST /_monitoring/bulk] instead." | ||
|
||
- is_false: errors |