Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

InfluxDB is an open-source time series database for the storage and retrieval of time series data. It is designed to store large volumes of time series data and quickly perform analysis of the stored data. Within FlexDeploy, these features are leveraged to provide end-users with Value Stream Metrics that are available on the Dashboard page and the Project Insights section in all the Projects.

InfluxDB System Requirements

  • 2 to 4 GB of available RAM for the system

  • 1+ CPU or vCPU Cores

  • Recommend 5GB of disk space for storage of InfluxDB data with a minimum of 500 IOPS for the storage device. This is a part of the total space recommended for the Application Directory here

  • At least 16384 available file descriptors (ulimit) on Linux machines

Info

All the commands specified have to be run from the <FLEXDEPLOY_HOME>/influxdb directory

InfluxDB Directory Structure with FlexDeploy

The executables for the database and the command line client along with the associated configuration are stored in the influxdb directory in the <FLEXDEPLOY_HOME>

...

The files in the config directory:

  • config.yaml - Used to store customizations to the overall InfluxDB configuration. Details on available options can be found here

  • fdinflux.config - Stores details that will be used by FlexDeploy to connect to the InfluxDB instance like URL, Org, and Bucket. Can also be used to override the default value for the wait duration between writes.

The time series data for the InfluxDB instance is stored in <FLEXDEPLOY_HOME>/application/vsm/data

...

The presence of the wal directory indicates that the Org has been successfully set up in InfluxDB and data is being written here.

InfluxDB Token Management

The influx auth command can be used to manage the API Tokens for use with FlexDeploy. Further information about the command can be found here.

  • The influx auth list command can be used to list all the API Tokens available for the instance.

  • The influx auth create command can be used to create a new API Token that can be used by FlexDeploy.
    FlexDeploy requires the created API Token to have the following permissions at the minimum.

    Code Block
    languagebash
    read-buckets
    read-orgs
    write-buckets
    write-orgs
  • The influx auth active -i <token_id> and the influx auth inactive -i <token_id> commands can be used to activate and deactivate API Tokens temporarily as required.

  • The influx auth delete -i <token_id> command can be used to delete any unused API Tokens.

The current API Token that you wish to use with FlexDeploy must be set as the value for the FD_INFLUXDB_ADMIN_TOKEN credential.

Retention Policy for Metrics/Insights

The retention policy for the time series data in InfluxDB is set to 2 years after the installation of FlexDeploy. This is separate from the Purge Settings available in FlexDeploy and only covers the duration of data available to be displayed in Metrics/Insights. Any data older than this is automatically removed by InfluxDB at regular intervals.

The retention period can be modified by using the below command if required.

Code Block
languagebash
# The id of the bucket can be obtained from the "influx bucket ls" command
$ ./influx bucket update --id <bucket_id> --retention <rentention_period>

Common Troubleshooting

Check if InfluxDB is currently running

The influx ping command can be used to check if InfluxDB is currently running. Influx starts from the StartFlexDeploy.sh script, not the usual Tomcat start script. Please always use the StartFlexDeploy.sh script to start FlexDeploy.

If InfluxDB is running, “OK“ is printed as the output with a 0 return code.

If InfluxDB is not currently running, the return code is 1 with an error along the following lines.

Code Block
languagebash
Error: Get "http://localhost:8086/health": dial tcp [::1]:8086: connect: connection refused

Org or Token is not correctly configured (401 Unauthorized)

If you are seeing 401 Unauthorized errors after starting up FlexDeploy or when using the CLI, this could indicate that the org setup has not been done, or the token was lost.

Stop the influxd process (you can leave FlexDeploy running) and you can use recovery commands to determine what your previous values were. These can then be stored into your installer configuration and FlexDeploy credentials.

Code Block
 /u01/flexdeploy/apache-tomcat-flexdeploy/bin/influxd-stop.sh

WORKING_DIRECTORY is usually ${FLEXDEPLOY_HOME}/application

Code Block
./influxd recovery auth list --bolt-path ${WORKING_DIRECTORY}/vsm/data/influxd.bolt

./influxd recovery org list --bolt-path ${WORKING_DIRECTORY}/vsm/data/influxd.bolt

If you get a result for each of the above, then you have your token and org, and you can use them. Store them in your installer configuration file and store the token your FlexDeploy credential.

if these commands didn’t return, then run setup:

Code Block
languagebash
$ rm -rf ~/.influxdbv2
$ ./influx setup --bucket flexbucket --token ${INFLUX_DB_TOKEN} --org flexdeploy --username=flexuser --password=${INFLUX_DB_PASSWORD} --host=http://localhost:8086 --force

Once you have your org and token, you can run this (replace the values with your token and org)

Code Block
rm -rf ~/.influxdbv2
mkdir ~/.influxdbv2
echo "[default]
  url = \"http://localhost:8086\"
  token =\"INFLUX_DB_TOKEN\"
  org = \"INFLUX_DB_ORG\"
  active = true
" >  ~/.influxdbv2/configs

Start influx again when you are ready.

Code Block
/u01/flexdeploy/apache-tomcat-flexdeploy/bin/influxd-start.sh

401 Unauthorized errors in Dashboard/Project Insights even with Org configured

The active API Token that you wish to use with FlexDeploy must be set as the value for the FD_INFLUXDB_ADMIN_TOKEN credential on the Credentials page. Once this is set, refreshing the Dashboard/Project page should resolve the issue.

No data is shown in Dashboard/Project Insights after startup(after updating FlexDeploy)

...

Include Page
SHAR:InfluxDB in FlexDeploy
SHAR:InfluxDB in FlexDeploy