1

I would like to know if it is possible somehow from the CLI of the influx to select the data of a specific shard. I also would like to select the series within two timestamps but i haven't yet found how. Any input would be appreciated, thank you.

user3224454
  • 194
  • 2
  • 16

1 Answers1

1

Q: I would like to know if it possible somehow from the CLI of the influx to select the data of a specific shard.

A: At influxdb 1.3 this is not possible. However you should be able to work out what data lives in there.

Query to get the shards information:

show shards

it should tell you the start and end date time of the data (across all series in the database) contained in that shard.

For instance

Given Shard info:

id  database  retention_policy shard_group start_time           end_time             expiry_time          owners
--  --------  ---------------- ----------- ----------           --------             -----------          ------
123 mydb      autogen          123         2012-11-26T00:00:00Z 2012-12-03T00:00:00Z 2012-12-03T00:00:00Z
124 mydb      autogen          124         2013-01-14T00:00:00Z 2013-01-21T00:00:00Z 2013-01-21T00:00:00Z
125 mydb      autogen          125         2013-04-29T00:00:00Z 2013-05-06T00:00:00Z 2013-05-06T00:00:00Z 

Given Measurements:

name: measurements
name
----
measurement_abc
measurement_def
measurement_123

Shard 123 will contain all of the data across the noted measurements above that fall in the start time of 2012-11-26T00:00:00Z and end time of 2012-12-03T00:00:00Z. That is, running a drop shard 123 would see data in that range disappearing across the measurements.

Rahul Shukla
  • 646
  • 6
  • 19
Samuel Toh
  • 18,006
  • 3
  • 24
  • 39