[console] Update cluster API (#16550)

* cluster.allocation_explain.json

* cluster.get_settings.json

* cluster.health.json

* cluster.pending_tasks.json

* cluster.put_settings.json

* cluster.remote_info.json

* cluster.reroute.json

* cluster.state.json

* cluster.stats.json

* rm cluster.js

* rm cluster.js
This commit is contained in:
Jonathan Budzenski 2018-02-14 09:23:32 -06:00 committed by GitHub
parent c316887a1a
commit 8fe21e4d6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 303 additions and 142 deletions

View file

@ -4,7 +4,6 @@ import { getSpec } from './spec'
let parts = [
require('./es_5_0/aliases'),
require('./es_5_0/aggregations'),
require('./es_5_0/cluster'),
require('./es_5_0/document'),
require('./es_5_0/filter'),
require('./es_5_0/nodes'),

View file

@ -1,141 +0,0 @@
export default function (api) {
api.addEndpointDescription('_cluster/state', {
patterns: [
"_cluster/state",
"_cluster/state/{metrics}",
"_cluster/state/{metrics}/{indices}"
],
url_components: {
"metrics": ["version", "master_node", "nodes", "routing_table", "routing_node", "metadata", "blocks"]
}
});
api.addEndpointDescription('_cluster/health', {
url_params: {
"local": "__flag__",
"level": ["indices", "shards"],
"master_timeout": "30s",
"timeout": "30s",
"wait_for_status": ["yellow", "green"],
"wait_for_relocating_shards": 0,
"wait_for_active_shards": 0,
"wait_for_nodes": 0
}
});
api.addEndpointDescription('_cluster/pending_tasks');
api.addEndpointDescription('get_cluster/settings', {
patterns: [
'_cluster/settings'
]
});
api.addEndpointDescription('put_cluster/settings', {
methods: ['PUT'],
patterns: [
'_cluster/settings'
],
data_autocomplete_rules: {
persistent: {
cluster: {
routing: {
'allocation.enable': { __one_of: ["all", "primaries", "new_primaries", "none"] },
'allocation.disk.threshold_enabled': { __one_of: [false, true] },
'allocation.disk.watermark.low': '85%',
'allocation.disk.watermark.high': '90%',
'allocation.disk.include_relocations': { __one_of: [true, false] },
'allocation.disk.reroute_interval': '60s',
'allocation.exclude': {
'_ip': "",
'_name': "",
'_host': "",
'_id': ""
},
'allocation.include': {
'_ip': "",
'_name': "",
'_host': "",
'_id': ""
},
'allocation.require': {
'_ip': "",
'_name': "",
'_host': "",
'_id': ""
},
'allocation.awareness.attributes': [],
'allocation.awareness.force': {
'*': {
'values': []
}
},
'allocation.allow_rebalance': { __one_of: ['always', 'indices_primaries_active', 'indices_all_active'] },
'allocation.cluster_concurrent_rebalance': 2,
'allocation.node_initial_primaries_recoveries': 4,
'allocation.node_concurrent_recoveries': 2,
'allocation.same_shard.host': { __one_of: [false, true] }
}
},
indices: {
breaker: {
"total.limit": "70%",
"fielddata.limit": "60%",
"fielddata.overhead": 1.03,
"request.limit": "40%",
"request.overhead": 1.0
}
}
},
transient: {
__scope_link: '.persistent'
}
}
});
api.addEndpointDescription('_cluster/reroute', {
methods: ['POST'],
url_params: {
explain: "__flag__",
dry_run: "__flag__"
},
data_autocomplete_rules: {
commands: [
{
move: {
__template: {
index: "",
shard: 0,
from_node: "",
to_node: ""
},
index: "{index}",
shard: 0,
from_node: "{node}",
to_node: "{node}"
},
cancel: {
__template: {
index: "",
shard: 0,
node: ""
},
index: "{index}",
shard: 0,
node: "{node}",
allow_primary: { __one_of: [true, false] }
},
allocate: {
__template: {
index: "",
shard: 0,
node: ""
},
index: "{index}",
shard: 0,
node: "{node}",
allow_primary: { __one_of: [true, false] }
}
}
],
dry_run: { __one_of: [true, false] }
}
});
}

View file

@ -0,0 +1,15 @@
{
"_cluster/allocation/explain": {
"url_params": {
"include_yes_decisions": "__flag__",
"include_disk_info": "__flag__"
},
"methods": [
"GET",
"POST"
],
"patterns": [
"_cluster/allocation/explain"
]
}
}

View file

@ -0,0 +1,16 @@
{
"_cluster/settings": {
"url_params": {
"flat_settings": "__flag__",
"master_timeout": "",
"timeout": "",
"include_defaults": "__flag__"
},
"methods": [
"GET"
],
"patterns": [
"_cluster/settings"
]
}
}

View file

@ -0,0 +1,38 @@
{
"_cluster/health": {
"url_params": {
"level": [
"cluster",
"indices",
"shards"
],
"local": "__flag__",
"master_timeout": "",
"timeout": "",
"wait_for_active_shards": "",
"wait_for_nodes": "",
"wait_for_events": [
"immediate",
"urgent",
"high",
"normal",
"low",
"languid"
],
"wait_for_no_relocating_shards": "__flag__",
"wait_for_no_initializing_shards": "__flag__",
"wait_for_status": [
"green",
"yellow",
"red"
]
},
"methods": [
"GET"
],
"patterns": [
"_cluster/health",
"_cluster/health/{indices}"
]
}
}

View file

@ -0,0 +1,14 @@
{
"_cluster/pending_tasks": {
"url_params": {
"local": "__flag__",
"master_timeout": ""
},
"methods": [
"GET"
],
"patterns": [
"_cluster/pending_tasks"
]
}
}

View file

@ -0,0 +1,15 @@
{
"_cluster/settings": {
"url_params": {
"flat_settings": "__flag__",
"master_timeout": "",
"timeout": ""
},
"methods": [
"PUT"
],
"patterns": [
"_cluster/settings"
]
}
}

View file

@ -0,0 +1,11 @@
{
"_remote/info": {
"url_params": {},
"methods": [
"GET"
],
"patterns": [
"_remote/info"
]
}
}

View file

@ -0,0 +1,18 @@
{
"_cluster/reroute": {
"url_params": {
"dry_run": "__flag__",
"explain": "__flag__",
"retry_failed": "__flag__",
"metric": [],
"master_timeout": "",
"timeout": ""
},
"methods": [
"POST"
],
"patterns": [
"_cluster/reroute"
]
}
}

View file

@ -0,0 +1,38 @@
{
"_cluster/state": {
"url_params": {
"local": "__flag__",
"master_timeout": "",
"flat_settings": "__flag__",
"ignore_unavailable": "__flag__",
"allow_no_indices": "__flag__",
"expand_wildcards": [
"open",
"closed",
"none",
"all"
]
},
"methods": [
"GET"
],
"patterns": [
"_cluster/state",
"_cluster/state/{metrics}",
"_cluster/state/{metrics}/{indices}"
],
"url_components": {
"indices": null,
"metrics": [
"_all",
"blocks",
"master_node",
"metadata",
"nodes",
"routing_nodes",
"routing_table",
"version"
]
}
}
}

View file

@ -0,0 +1,15 @@
{
"_cluster/stats": {
"url_params": {
"flat_settings": "__flag__",
"timeout": ""
},
"methods": [
"GET"
],
"patterns": [
"_cluster/stats",
"_cluster/stats/nodes/{nodes}"
]
}
}

View file

@ -0,0 +1,11 @@
{
"_cluster/health": {
"url_params": {
"master_timeout": "30s",
"timeout": "30s",
"wait_for_relocating_shards": 0,
"wait_for_active_shards": 0,
"wait_for_nodes": 0
}
}
}

View file

@ -0,0 +1,67 @@
{
"_cluster/settings": {
"data_autocomplete_rules": {
"persistent": {
"cluster": {
"routing": {
"allocation.enable": {
"__one_of": ["all", "primaries", "new_primaries", "none"]
},
"allocation.disk.threshold_enabled": { "__one_of": [false, true] },
"allocation.disk.watermark.low": "85%",
"allocation.disk.watermark.high": "90%",
"allocation.disk.include_relocations": { "__one_of": [true, false] },
"allocation.disk.reroute_interval": "60s",
"allocation.exclude": {
"_ip": "",
"_name": "",
"_host": "",
"_id": ""
},
"allocation.include": {
"_ip": "",
"_name": "",
"_host": "",
"_id": ""
},
"allocation.require": {
"_ip": "",
"_name": "",
"_host": "",
"_id": ""
},
"allocation.awareness.attributes": [],
"allocation.awareness.force": {
"*": {
"values": []
}
},
"allocation.allow_rebalance": {
"__one_of": [
"always",
"indices_primaries_active",
"indices_all_active"
]
},
"allocation.cluster_concurrent_rebalance": 2,
"allocation.node_initial_primaries_recoveries": 4,
"allocation.node_concurrent_recoveries": 2,
"allocation.same_shard.host": { "__one_of": [false, true] }
}
},
"indices": {
"breaker": {
"total.limit": "70%",
"fielddata.limit": "60%",
"fielddata.overhead": 1.03,
"request.limit": "40%",
"request.overhead": 1.0
}
}
},
"transient": {
"__scope_link": ".persistent"
}
}
}
}

View file

@ -0,0 +1,45 @@
{
"_cluster/reroute": {
"data_autocomplete_rules": {
"commands": [
{
"move": {
"__template": {
"index": "",
"shard": 0,
"from_node": "",
"to_node": ""
},
"index": "{index}",
"shard": 0,
"from_node": "{node}",
"to_node": "{node}"
},
"cancel": {
"__template": {
"index": "",
"shard": 0,
"node": ""
},
"index": "{index}",
"shard": 0,
"node": "{node}",
"allow_primary": { "__one_of": [true, false] }
},
"allocate": {
"__template": {
"index": "",
"shard": 0,
"node": ""
},
"index": "{index}",
"shard": 0,
"node": "{node}",
"allow_primary": { "__one_of": [true, false] }
}
}
],
"dry_run": { "__one_of": [true, false] }
}
}
}