Login to InfluxDB
influx -username admin -password ''
Show databases
show databases
Show tables
show measurements
Showing table Tags
SHOW TAG KEYS ON <database>
SHOW TAG KEYS FROM <table>
Showing table Fields
SHOW FIELD KEYS ON <database>
SHOW FIELD KEYS FROM <table>
Selecting data with multiple WHERE parameters
select time,ifAlias,INOCTETS from ports where hostname = 'router-1.example.com' and ifAlias =~ 'OCA' and "time" > '2023-08-03T01:15:00.0Z' and "time" < '2023-08-03T01:50:00.0Z';
Deleting data within a time range and with a specific matching value (Don't forget the DB is using UTC - add 7 hours for MST)
delete from ports where "time" > '2023-02-28T09:00:00.0000000Z' and "time" < '2023-02-28T17:00:00.0000000Z' and "hostname" = 'hostname.domain.net'
delete from ports where "time" >= '2023-03-08T18:00:00.0000000Z' and "time" <= '2023-03-08T18:30:00.0000000Z' and "ifAlias" =~ /Voice/