-
-
Notifications
You must be signed in to change notification settings - Fork 20
Setting up influxdb for VSCP use
This is a simple step by step guide on how to setup influxdb for use with a VSCP system. It concentrate on the >2 version only. There is plenty of information available about the earlier versions.
The instructions is for a Debian based (or derived) system. Links are provided to relevant parts that can used for other setups.
Full install instructions are here.
influxdb needs curl so install it first. You do this with
sudo apt install curl
Now get the latest version of influxdb with
wget https://dl.influxdata.com/influxdb/releases/influxdb2-2.0.8-amd64.deb
Install with
sudo sudo dpkg -i influxdb2-2.0.8-amd64.deb
After the install is finished verify that the influxdb server is running with
sudo service influxdb status
You can read more about controlling (start/stop/restart) the systemd service here
When the server is running it exports a web interface at http://localhost:8086. Setup your admin server account in this interface the first thing you do. Note your token and your organisation.
Now issue
influx config create --active -n config-name -u http://localhost:8086 -t mySuP3rS3cr3tT0keN -o example-org
where mySuP3rS3cr3tT0keN is your token and example-org is your organisation.
Note that the web interface is open at this moment. We recommend that you get a letsencrypt certificate for your server and follow the steps described here to secure your server. This is entirely optional of course.
export INFLUX_TOKEN=mySuP3rS3cr3tT0keN
where mySuP3rS3cr3tT0keN is your personal token from above. Doing this lets you omit the token when you issue commands.
Create a bucket vscptest we can use for some testing. You will delete it later on in this guide.
Full info about adding data to influx is here
Before we can do anything useful we need to add some VSCP data to the bucket we created above.
Full influx query info is here
to be continure ....
The VSCP Project (https://www.vscp.org) - Copyright © 2000-2024 Åke Hedman, the VSCP Project