InfluxDB

InfluxDB is an open-source time series database that is a perfect companion to WarpStream's Apache Kafka-compatible clusters.

A video walkthrough can be found below:

Prerequisites

  1. WarpStream account - get access to WarpStream by registering here.

  2. InfluxDB account - get access to InfluxDB by registering here.

  3. InfluxDB Telegraf is installed locally.

  4. A WarpStream cluster is up and running.

Step 1: Get WarpStream data

You will need to collect and save the following pieces of information from WarpStream to be used in InfluxDB before you get started:

  • Bootstrap broker

  • SASL Username

  • SASL Password

  • Topic

The first three items can be easily attained by creating a new credential for your cluster in the web UI.

Step 2: Configure a Kafka source in InfluxDB

Starting in the InfluxDB UI, select the up arrow icon in the left navigation to see available sources. Many options exist, so we enter Kafka to narrow it down. There are three results, and it is unclear which one to select; in our case, we are using the middle one that says Kafka Consumer.

On the next screen, select Use this plugin and Create a new configuration.

Give the configuration a name, and if you create a new bucket, select that option, which we will use for this example.

When you create a bucket, you have some options. For this example, we will call the bucket sensors to match the Topic feeding it.

Step 3: Editing the Telegraf script

InfluxDB has a pipeline tool called Telegraf that is coupled with InfluxDB. After you selected CREATE at the end of the previous step, you'll be presented with the script for you to update to match your needs. There are several areas to modify, but starting at the top, you want to replace the brokers with the value you saved for the Bootstrap broker in Step 1, and the Topic from Step 1 goes into topics to replace the value telegraf.

Next, find the SASL segment uncomment sasl_username and sasl_password, then replace the values with those you saved in Step 1. Next, uncomment sasl_mechanism and type PLAIN in the quotes.

Just after sasl_mechanism, add the following two lines:

enable_tls = true
version = "1.0.0"

Then select SAVE & TEST at the bottom.

Step 4: Run Telegraf

The final setup screen you will be presented with is this one:

Save the commands in Steps 2 and 3, then paste them into a terminal where Telegraf is installed. A feature to understand here is that the API token will correlate to the URL for starting Telegraf and will execute the script that you just finished configuring. Editing the Telegraf script on InfluxDB will alter the behavior.

With Telegraf now running, the data in your WarpStream topic will be available in InfluxDB for access using its broad range of tools.

Next Steps

Congratulations! You've set up a Telegraf script to pipe data from WarpStream to InfluxDB.

Next, check out the WarpStream docs for configuring the WarpStream Agent, or review the InfluxDB docs to learn more about what is possible with WarpStream and InfluxDB!

Last updated