How-To Guides
Configure an External DataHub Source
6min
when you configure the timeseries db docid 9th38ltnkfhzv3rsf7bmp in datahub, you have the option of selecting an internal or external source this guide will show you how to configure an external datahub source with an influxdb database video user scenario in this guide you will deploy influxdb from the same computer ( windows based ) running litmus edge and then configure the influxdb database for the datahub timeseries db for your specific scenario, you can deploy an external influxdb database and connect to it from litmus edge datahub before you begin you will need to set up your computer so that it can run docker commands follow the steps to connect a device docid\ ish7bqhzxswtdx8vbnszb (with enable data store selected) and add tags docid\ xgwokqbtpevii7or82ll0 in devicehub the data from the tags will be used to test the connection of the timeseries db step 1 set up influxdb you will first need to pull an influxdb image file and then run it on your computer to set up influxdb on your computer, open the command prompt window run the following command docker run name influxdb p 8086 8086 influxdb 2 0 9 the command will create the influxdb container with the name "influxdb", on port 8086, and install influxdb version 2 0 9 if you are using a different version of influxdb, update the version number once the pulling and running of influxdb is complete, open a browser window and enter http //localhost 8086 in the address window the setup screen for influxdb displays configure the details for the initial user you will need to refer to the organization name when configuring the timeseries db in litmus edge username password initial organization name initial bucket name click continue continue setting up the database as needed return to the homepage of influxdb navigate to data > tokens then, click the token name already created details for the token display click copy to clipboard and store the token somewhere securely you will refer to this when setting up the timeseries db in litmus edge now that influxdb is configured to your specific requirements and you've collected the parameters needed to set up the connection, you can complete the setup in litmus edge step 2 configure datahub timeseries db you can now configure the datahub timeseries db and use the influxdb database as the source to configure the datahub timeseries db navigate to datahub > configuration click the toggle to enable the timeseries db and select the source type of external configure the parameters db uri enter http //localhost 8086 auth token paste the token copied in step 1, number 9 organization name enter the organization name configured in step 1, number 4 db vendor select influxdb v2 x description (optional) enter a description name enter a name for the configuration click save click test and review the result step 3 verify connection in influxdb return to the influxdb browser window and explore the metrics to ensure that data is being successfully sent from litmus edge to influxdb