🩺InfluxDB

InfluxDB is an open-source time series database used by Datasentinel to store collected metrics and manage data retention.

Data is organized into time series, each of which contains a set of data points that are timestamped.

Usually, no management tasks are necessary with the InfluxDB backend database. However, if you require information about InfluxDB, here are some useful tips:

Datasentinel store metrics in the database ds-data with a default retention policy of 14 days (named ds-data)

Data is stored in daily shards, located in the directory /datasentinel/data/influxdb/data.

Additionally, the database employs series files found in the directory /datasentinel/data/influxdb/data/ds-data/_series, which facilitate the mapping of time series data to corresponding shards.

A complete installation embeds an InfluxDB database (Version 1.7.6) but you can use your own Influxdb database on a separate server.

Please contact [email protected] if you plan to use your own database.

Database Size

Here are some OS commands to check the size of an InfluxDB database.

InfluxDB is configured to manage its data storage and retention by dividing metrics into daily shards. A new directory is created each day.

The database ds-data stores its metrics in the directory /datasentinel/data/influxdb/data/ds-data/.

To see the size used by the retention policies, use the following command:

du -sh /datasentinel/data/influxdb/data/ds-data/*

The subdirectory ds-data corresponds to the default retention policy and holds the stored metrics.

Display the size of each daily shard:

du -sh /datasentinel/data/influxdb/data/ds-data/ds-data/*

Series File

Show Logs

The default log level for InfluxDB is set to error.

To view every action taken by InfluxDB, you can change the log level to info in the [logging] section of the configuration file located at

/datasentinel/soft/influxdb-1.7.6-1/etc/influxdb/influxdb.conf.

This can be helpful in troubleshooting issues but needs restart.

To access the logs, use the following command:

Useful Commands

InfluxDB is configured to listen on port 8216.

An alias is present on the platform owner account, allowing you to simply type influx to connect.

Some useful commands when analyzing the InfluxDB database.

  • Cardinality

  • Daily created series by shard

  • Number of points per second being written to the instance.

  • Modify the Retention Policy (Typically done through the User Interface)

Recreating Indexes

Official documentation: https://docs.influxdata.com/influxdb/v1.7/administration/rebuild-tsi-index/#

Recreating the Database

The directory /datasentinel/data/influxdb/data/ds-data is deleted and the storage space freed up.

Connect to influxDB as datasentinel user.

  • Type influx

  • Drop the database

  • Create the database

  • Create retention policies

Metrics

Show internals metrics

Debug

Generate a JSON file intended to assist the support team with analysis.

Last updated