Skip to main content
Version: 2.6

Good To Know about InfluxDB

InfluxDB 1.x Commands used within the external components

InfluxDB 1.x does not have any visual UI. Instead, all configurations are made through the client (there is an Influx Client Console therefore). For the purpose of setting up and managing the database, we will need following useful commands (all commands can be found at the InfluxDB website https://docs.influxdata.com/influxdb/cloud/reference/cli/influx/):

Database management

Create new database:

create database NNN

Select database (must be entered when working with the data):

use NNN

Show databases:

show databases

Delete database:

drop database NNN

Managing data

List all in the used the database measurements:

show measurements

Select all data from a measurement:

select \* from NNN

Delete a measurement:

delete from NNN

Select a field from a measurement:

select YYY from NNN

Select multiple fields from a measurement:

select YYY, ZZZ from NNN

Select a field from a measurement, sort by time and limit the entries to the last 3:

select YYY from NNN order by time desc limit 3

Select a measurement, sort by time, match a value and limit the entries to the last 3:

select \* from NNN where YYY =\~ /UUU/ order by time desc limit 3

Select a measurement, sort by time, do not match a value and limit the entries to the last 3:

select \* from NNN where YYY !\~ /UUU/ order by time desc limit 3

Troubleshooting

Q: Why are none of the loggers logging?

A: This can have multiple reasons. Use the following list as a checklist:

  1. Are there any errors in the log of HumanOS®?

    1. Connection to Influx is ok?

    2. Logger is not in buffering mode due to a previously thrown error?

  2. Is the plugin enabled (Disabled- flag in settings.json set to false)?

  3. Is the service rule entry configured withing the publisher configuration?

  4. Check the node filter of the data set. Are all conditions valid?

  5. Check the data state. Values are sent to InfluxDB only if the data state is “Good”.

Q: Why is the buffering not working or my data slowly drips to the endpoint?

A: This most likely may be caused by a networking delay. If the buffering is not working as expected (not all data is buffered or not all data is buffered throughout loss of connection), lower your “NetworkTimeout” time. If the data slowly drips into your endpoint, check the routing configuration of your network. to a specific time in milliseconds.

Q: Why do I get an Error upon posting to InfluxDB?

A: If the error text goes by the term “An operation was cancelled” or similar, you might have a network timeout issue. Check your timeout value entered, if it is below 100 (timeout in ms), it is probably too low.

Q: Why is InfluxDB always telling me it got rejected upon posting an entry by HumanOS®?

A: If you ever have had a Kapacitor Instance running and you did not prohibit the subscription to your Influx Instance there will be Kapacitor Subscriptions. If you are not using Kapacitor anymore, you can clean the subscriptions (you will most likely have to clean all of them) by executing following commands:

SHOW SUBSCRIPTIONS

DROP SUBSCRIPTION "\<subscriber\>" ON "\<myDatabase\>"."autogen"