add the verbose flag to view shard owner detail

pull/1387/head
Kelly 2020-09-01 15:14:40 -07:00 committed by Scott Anderson
parent 84d314c769
commit 72dd78c7a9
1 changed files with 127 additions and 0 deletions

View File

@ -969,6 +969,133 @@ ID Database Retention Policy Desired Replicas Shard Group Start
52 telegraf autogen 2 37 2017-03-13T00:00:00Z 2017-03-20T00:00:00Z [{5 cluster-data-node-02:8088} {26 cluster-data-node-01:8088}]
```
##### Use the verbose flag to view more shard owner detail
Use the verbose flag to show more detail about each shard owner, including the state (hot/cold), last modified date and time, and size on disk.
```bash
$ influxd-ctl show-shards -v
Shards
==========
ID Database Retention Policy Desired Replicas Shard Group Start End Expires Owners
1 telegraf autogen 2 1 2020-04-27T00:00:00Z 2020-05-04T00:00:00Z [{4 localhost:8188 hot 2020-04-28 13:59:50.022558549 -0400 EDT 1784222 <nil>} {5 localhost:8288 hot 2020-04-28 13:59:50.02605612 -0400 EDT 1785568 <nil>}]
2 stress autogen 2 2 2020-04-27T00:00:00Z 2020-05-04T00:00:00Z [{4 localhost:8188 hot 2020-04-28 13:50:57.076073713 -0400 EDT 102637693 <nil>} {5 localhost:8288 hot 2020-04-28 13:50:57.136074013 -0400 EDT 102915477 <nil>}]
3 _internal monitor 1 3 2020-04-28T00:00:00Z 2020-04-29T00:00:00Z 2020-05-06T00:00:00Z [{5 localhost:8288 hot 2020-04-28 13:59:50.017341511 -0400 EDT 627431 <nil>}]
4 _internal monitor 1 3 2020-04-28T00:00:00Z 2020-04-29T00:00:00Z 2020-05-06T00:00:00Z [{4 localhost:8188 hot 2020-04-28 13:59:50.01737255 -0400 EDT 1014827 <nil>}]
```
##### Use the verbose flag in a curl request
```bash
curl -X GET 'localhost:8191/show-shards?verbose=true' | jq .
Sample output:
[
{
"id": "1",
"database": "telegraf",
"retention-policy": "autogen",
"replica-n": 2,
"shard-group-id": "1",
"start-time": "2020-04-27T00:00:00Z",
"end-time": "2020-05-04T00:00:00Z",
"expire-time": "0001-01-01T00:00:00Z",
"truncated-at": "0001-01-01T00:00:00Z",
"owners": [
{
"id": "4",
"tcpAddr": "localhost:8188",
"state": "hot",
"last-modified": "2020-04-28T14:01:50.026425382-04:00",
"size": 1949209,
"err": null
},
{
"id": "5",
"tcpAddr": "localhost:8288",
"state": "hot",
"last-modified": "2020-04-28T14:01:50.028726299-04:00",
"size": 1950785,
"err": null
}
]
},
{
"id": "2",
"database": "stress",
"retention-policy": "autogen",
"replica-n": 2,
"shard-group-id": "2",
"start-time": "2020-04-27T00:00:00Z",
"end-time": "2020-05-04T00:00:00Z",
"expire-time": "0001-01-01T00:00:00Z",
"truncated-at": "0001-01-01T00:00:00Z",
"owners": [
{
"id": "4",
"tcpAddr": "localhost:8188",
"state": "hot",
"last-modified": "2020-04-28T13:50:57.076073713-04:00",
"size": 102637693,
"err": null
},
{
"id": "5",
"tcpAddr": "localhost:8288",
"state": "hot",
"last-modified": "2020-04-28T13:50:57.136074013-04:00",
"size": 102915477,
"err": null
}
]
},
{
"id": "3",
"database": "_internal",
"retention-policy": "monitor",
"replica-n": 1,
"shard-group-id": "3",
"start-time": "2020-04-28T00:00:00Z",
"end-time": "2020-04-29T00:00:00Z",
"expire-time": "2020-05-06T00:00:00Z",
"truncated-at": "0001-01-01T00:00:00Z",
"owners": [
{
"id": "5",
"tcpAddr": "localhost:8288",
"state": "hot",
"last-modified": "2020-04-28T14:01:50.023569927-04:00",
"size": 690633,
"err": null
}
]
},
{
"id": "4",
"database": "_internal",
"retention-policy": "monitor",
"replica-n": 1,
"shard-group-id": "3",
"start-time": "2020-04-28T00:00:00Z",
"end-time": "2020-04-29T00:00:00Z",
"expire-time": "2020-05-06T00:00:00Z",
"truncated-at": "0001-01-01T00:00:00Z",
"owners": [
{
"id": "4",
"tcpAddr": "localhost:8188",
"state": "hot",
"last-modified": "2020-04-28T14:01:50.022177797-04:00",
"size": 1117271,
"err": null
}
]
}
]
```
### `update-data`
Updates a data node's address in the [meta store](/enterprise_influxdb/v1.8/concepts/glossary/#meta-service).