Influxdb: SHOW SHARDS, SHOW SHARD GROUPS should allow for filtered output

Created on 24 Sep 2016  路  9Comments  路  Source: influxdata/influxdb

Feature Request

Proposal: [Description of the feature]

SHOW SHARDS should support the ON or FOR filter per database or retention policy, with regex.

Current behavior: [What currently happens]

SHOW SHARDS is monolithic, it always returns all data about all shards

Desired behavior: [What you would like to happen]

SHOW SHARDS ON mydb would show shards only for mydb.

SHOW SHARDS ON mydb.autogen would show shards only for the autogen RP on mydb.

Use case: [Why is this important (helps with prioritizing requests)]

Production systems with many databases can easily have SHOW SHARDS output in the 10s of thousands of lines, and it's impossible to investigate a specific problematic database or RP.

1.x support wontfix

Most helpful comment

There aren't any queries that take a DB or a DB/RP combo. http://docs.influxdata.com/influxdb/v1.0/query_language/spec/#clauses

If it makes it easier, the first implementation can ignore the RP and only accept a database with ON. Later we can revisit if we need more granularity.

Also, I forgot to mention SHOW SHARD GROUPS as another query that needs the ability to restrict to a database.

All 9 comments

perhaps I was too hasty

@jwilder proposing for 1.1.

@beckettsean I'm not sure ON is the appropriate syntax for this. We don't currently have any commands that use ON with both a database and retention policy. They all only have the database. I'm also not sure FROM is appropriate either since that usually references a measurement. I'm not sure we have anything that does both database and retention policy at the moment. Any ideas?

There aren't any queries that take a DB or a DB/RP combo. http://docs.influxdata.com/influxdb/v1.0/query_language/spec/#clauses

If it makes it easier, the first implementation can ignore the RP and only accept a database with ON. Later we can revisit if we need more granularity.

Also, I forgot to mention SHOW SHARD GROUPS as another query that needs the ability to restrict to a database.

In the meantime, this snippet may help some users (where 'dbname_5m' is the name of your db):

$ influx -execute "show shards" -database="dbname_5m" | sed -n '/name: dbname_5m/,/^$/p'
name: all_client_5m
id   database      retention_policy shard_group start_time           end_time             expiry_time          owners
--   --------      ---------------- ----------- ----------           --------             -----------          ------
... rows with shard-info just for this db...

any update on this?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonira picture jonira  路  4Comments

ricco24 picture ricco24  路  3Comments

deepujain picture deepujain  路  3Comments

binary0111 picture binary0111  路  3Comments

Raniz85 picture Raniz85  路  3Comments