I am having set up influxdb:alpine and telegraf:alpine dockers on my system and have created a telegraf feed to pass docker logs to influx.
Therefore, the database being stored is in json_file format.
Viewing it in influxdb I see the information correctly but not as a json. I understand I need to use v1 CLI. However, I am having issues querying the data in influx CLI.
@kpankhurst With the InfluxQL shell, you have to tell it which database to use:
> USE databaseName
Also, in your InfluxQL query, your FROM statement should actually specify the measurement to query, not necessarily the database. If the database name is in your FROM clause, it’s only part of a “fully-qualified” measurement name. For example:
Query with just measurement
SELECT * FROM home
Query with a fully qualified measurement
SELECT * FROM "database-name"."retention-policy-name".home
So in your case, assuming your database name is logs and you want to query everything from the home measurement:
C:>influx v1 shell
InfluxQL Shell dev
Connected to InfluxDB OSS v2.7.1
> USE logs
> SELECT * FROM home