InfluxDB 0.13.0 how to work with it in special cases

Show special Measurements with a search string “pl line”

SHOW MEASUREMENTS WITH MEASUREMENT =~ /.*pl line.*/

if you have a lot of Measurements to delete you can do that in this way over SSH:

influx --execute 'show measurements' --database=db | grep "pl line" | xargs -I{} influx --database=db --execute 'drop measurement "{}"'

that will remove all Lines with results by grep, a dryrun can be done by this shorter line:

influx --execute 'show measurements' --database=db | grep "pl line"
just to see the hits

In some cases you can hit some special characters in current case i did hit in the Measurename double backslashes:

DROP MEASUREMENT "Measurement_name\\splitted by double backslashes" that will fail!

Here you will need to negotiate it by a backslash for each control character like backslash so that finally i get this also first with double quotas ”

DROP MEASUREMENT "Measurement_name\\\\splitted by double backslashes"

Speichere in deinen Favoriten diesen permalink.

Kommentare sind geschlossen.