influxdb-cli
influxdb-cli copied to clipboard
Supplying queries on the command line
It'd be nice to be able to supply queries on the command line, for saved one liners that will execute an influxdb query and then exit. Does this make sense? Eg something like:
influxdb-cli db --host influxdb.example \
--pretty --database test --time-precision u \
'select count(path) from /.*collectd.*/ where time > now() - 1h group by time(5m);'
Perhaps it would need a flag eg --query 'select ...'
Or feed a set of queries in via stdin eg:
cat influxdb_queries.txt | influxdb-cli ...