elasticsearch get-index
Get elastic search index
Description
Get information about elastic search index
Synopsis
elasticsearch get-index
[--site <site>]
[--cluster <cluster>]
[--filter_path <filter_path>]
[--raw]
[<index>]
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
cluster
- (string)
Name of elastic search cluster
Example: --cluster "elastic-default"
Default: elastic-default
Attributes: optional
filter_path
- (string)
Path in the response. Filters and returns only parts of response matching this path
Example: --filter_path "index.mappings.properties.*"
Default: _None_
Attributes: optional, multiple allowed
raw
- (bool)
If false, returns compact and aligned text output
Example: --raw
Default: _None_
Attributes: optional
index
- (string)
Name of the index
Example: "students"
Default: _all
Attributes: optional, multiple allowed
Examples
Input:
Output:{
"test": {
"aliases": {},
"mappings": {},
"settings": {
"index": {
"routing": {
"allocation": {
"include": {
"_tier_preference": "data_content"
}
}
},
"number_of_shards": "1",
"provided_name": "test",
"creation_date": "1633061676252",
"number_of_replicas": "1",
"uuid": "vpk0XgasRcGGTfpvF7R-SQ",
"version": {
"created": "7140299"
}
}
}
},
"test1": {
"aliases": {},
"mappings": {
"properties": {
"field1": {
"type": "text"
}
}
},
"settings": {
"index": {
"routing": {
"allocation": {
"include": {
"_tier_preference": "data_content"
}
}
},
"number_of_shards": "3",
"provided_name": "test1",
"creation_date": "1632751814205",
"number_of_replicas": "3",
"uuid": "07QzkcVMRVORd5zxHYLQ0Q",
"version": {
"created": "7140299"
}
}
}
}
}
[
{
"health": "red",
"status": "open",
"index": "my_target_index_17",
"uuid": "nHfj7WewRE2tQTMA5DTNcA",
"pri": "2",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "green",
"status": "open",
"index": "my_source_index",
"uuid": "tkkO4G2UQ_KDXfOUgZVuGQ",
"pri": "4",
"rep": "0",
"docs.count": "0",
"docs.deleted": "0",
"store.size": "832b",
"pri.store.size": "832b"
},
{
"health": "red",
"status": "open",
"index": "my_target_index_18",
"uuid": "9whKu-_zSretubh_P05hyw",
"pri": "2",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "yellow",
"status": "open",
"index": "test",
"uuid": "vpk0XgasRcGGTfpvF7R-SQ",
"pri": "1",
"rep": "1",
"docs.count": "0",
"docs.deleted": "0",
"store.size": "230b",
"pri.store.size": "230b"
},
{
"health": "red",
"status": "open",
"index": "my_target_index_9",
"uuid": "7j7EmPYKRcufspTWs_OtIw",
"pri": "1",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "yellow",
"status": "open",
"index": "t-test1",
"uuid": "WosIvQUYR-KmIydtOGUCBg",
"pri": "1",
"rep": "1",
"docs.count": "0",
"docs.deleted": "0",
"store.size": "208b",
"pri.store.size": "208b"
},
{
"health": "red",
"status": "open",
"index": "split_index_1",
"uuid": "h5jhRdxsRQibcXu64EHXoQ",
"pri": "8",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "red",
"status": "open",
"index": "target-test1",
"uuid": "ETmgcyngQUCKBzEQodk3qQ",
"pri": "1",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "red",
"status": "open",
"index": "my_target_index_91",
"uuid": "AxRVBmPJSYOVkKJNa9_QhA",
"pri": "2",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "yellow",
"status": "open",
"index": "test1",
"uuid": "07QzkcVMRVORd5zxHYLQ0Q",
"pri": "3",
"rep": "3",
"docs.count": "0",
"docs.deleted": "0",
"store.size": "690b",
"pri.store.size": "690b"
},
{
"health": "green",
"status": "open",
"index": ".geoip_databases",
"uuid": "wbVFSqdfRNKUTjeZ-AXx1A",
"pri": "1",
"rep": "0",
"docs.count": "42",
"docs.deleted": "3",
"store.size": "41.1mb",
"pri.store.size": "41.1mb"
},
{
"health": "red",
"status": "open",
"index": "my_target_index",
"uuid": "2Uduz_34SU6jQuSKQ1PQdQ",
"pri": "2",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "red",
"status": "open",
"index": "my_target_index_90",
"uuid": "ThDt-IeVTH-Ii6_N7M3gKA",
"pri": "1",
"rep": "2",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "red",
"status": "open",
"index": "my_target_index_6",
"uuid": "-PpVy-DlRHC5pKMjs4tnxw",
"pri": "2",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "red",
"status": "open",
"index": "my_target_index_7",
"uuid": "VW8SG6hoRDe_jQPHbcZYfA",
"pri": "2",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "yellow",
"status": "open",
"index": "sdfa",
"uuid": "KYONjP3aTTCi9wxsE-EbKw",
"pri": "1",
"rep": "2",
"docs.count": "0",
"docs.deleted": "0",
"store.size": "208b",
"pri.store.size": "208b"
},
{
"health": "red",
"status": "open",
"index": "my_target_index_4",
"uuid": "_ZE6FERzRO27o-H9Y9vPbQ",
"pri": "2",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "red",
"status": "open",
"index": "my_target_index_2",
"uuid": "RPp3p_ucSR6NYW4TlijnOQ",
"pri": "1",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "yellow",
"status": "open",
"index": "class",
"uuid": "HfkB3ftvSNSFf5HNXeKUbA",
"pri": "2",
"rep": "1",
"docs.count": "0",
"docs.deleted": "0",
"store.size": "416b",
"pri.store.size": "416b"
},
{
"health": "red",
"status": "open",
"index": "my_target_index_3",
"uuid": "AzqOzJ0wQZ-DUiJ26bFGlw",
"pri": "2",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
},
{
"health": "yellow",
"status": "open",
"index": "my-index-000001",
"uuid": "I340__lCQhmYTtKOQkRYUA",
"pri": "1",
"rep": "1",
"docs.count": "5",
"docs.deleted": "1",
"store.size": "20.2kb",
"pri.store.size": "20.2kb"
},
{
"health": "red",
"status": "open",
"index": "my_target_index_1",
"uuid": "K6oB-VNsTk-2_-kBFYWr1Q",
"pri": "1",
"rep": "1",
"docs.count": null,
"docs.deleted": null,
"store.size": null,
"pri.store.size": null
}
]
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "read" |
Service Type | "elasticsearch" |
Service Instance | cluster |
Namespace | |
Object Type | "index" |
Object ID | index |
Please see Access Control for details.