InfluxDB
InfluxDB is an open-source time series database that is a perfect companion to WarpStream's Apache Kafka-compatible clusters.
Last updated
InfluxDB is an open-source time series database that is a perfect companion to WarpStream's Apache Kafka-compatible clusters.
Last updated
A video walkthrough can be found below:
WarpStream account - get access to WarpStream by registering here.
InfluxDB account - get access to InfluxDB by registering here.
InfluxDB Telegraf is installed locally.
A WarpStream cluster is up and running.
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.
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.
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:
Then select SAVE & TEST at the bottom.
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.
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!