Configuration of Data Storage

Configuration of Data Storage

This step-by-step guide will walk you through creating a new bucket in InfluxDB. The bucket will be named with the schema groupX_lab, where X is your group’s number. Follow the instructions carefully to get started.

Prerequisites

  • Access to InfluxDB via the web interface or CLI (Command Line Interface).
  • Working VPN to Pforzheim University
  • URL: https://iot.hs-pforzheim.de:8086/
  • Credentials to log in to InfluxDB (username and password). They will be provided by the lecturer (see printout)

Configuration Process

Follow each step thoughfully to successfully preprocess and creation of our bucket for later usage with Node-RED, n8n, and Grafana.

Log in to InfluxDB

  1. Open your web browser and navigate to your InfluxDB instance URL. The URL for Pforzheim University’s InfluxDB is https://iot.hs-pforzheim.de:8086/. It is only accessible via VPN connection or within the University’s Wi-Fi.
  2. Enter the username groupX with X as a placeholder for your group name and the provided password to log in.

InfluxDB Login Overview

Using the CLI (Optional)

If you are using the CLI:

  1. Open a terminal window.

  2. Run the following command to log in:

    influx login --host https://iot.hs-pforzheim.de:8086/
  3. Enter your username and password when prompted.

Navigate to the Buckets Section

  1. After logging in, navigate to the left-hand sidebar. InfluxDB Load Data in Buckets
  2. Click on the “Load Data” tab to expand the menu.
  3. From the menu, select “Buckets”.

Create a New Bucket

  1. In the Buckets section, click the “Create Bucket” button in the top-right corner. InfluxDB Load Data in Buckets
  2. A window will pop up asking for the name of your bucket.
  3. Name your bucket using the schema groupX_lab (replace X with your group number). For example, if your group number is 1, you should name it group1_lab. InfluxDB Load Data in Buckets
  4. Define the retention period for your bucket. You can specify how long the data should be stored before it is automatically deleted. For our purposes, setting it to Infinite means the data will never expire unless manually deleted.
  5. Click “Create” to finalise the creation of your bucket.
Using the CLI (Optional)

If you prefer using the CLI, you can create the bucket with the following command:

influx bucket create --name groupX_lab --retention 0

Replace X with your group number. The retention period is set to 0 to specify that the bucket should store data indefinitely.

Verify the New Bucket

  1. After creating the bucket, you should see it listed under the “Buckets” section.
  2. You can now begin storing and retrieving data in your newly created bucket.
  3. Your bucket can also be explored in the “Data Explorer” section of InfluxDB. InfluxDB Data Explorer Bucket The second example shows a bucket with already existing data in the Data Explorer view. InfluxDB Data Explorer Bucket Detail

Conclusion

You have now successfully created a new bucket in InfluxDB with the schema groupX_lab. This bucket can be used to store your group’s data. Make sure to replace X with the appropriate group number throughout the process. If you encounter any issues or need further assistance, feel free to consult the InfluxDB Documentation or reach out to your lecturers.