Difference between revisions of "InfluxDB"
Line 23: | Line 23: | ||
*<code>sudo systemctl enable influxdb</code> | *<code>sudo systemctl enable influxdb</code> | ||
*<code>systemctl status influxdb</code> | *<code>systemctl status influxdb</code> | ||
+ | |||
+ | == Installing InfluxDB on Debial == | ||
+ | |||
+ | * sudo apt install influxdb | ||
+ | * sudo apt install influxdb-client | ||
==Setting up a Database== | ==Setting up a Database== | ||
Line 49: | Line 54: | ||
Are you planning to use this with Grafana? You will need to set up a datasource in Grafana then. | Are you planning to use this with Grafana? You will need to set up a datasource in Grafana then. | ||
− | == Using this with Node Red == | + | ==Using this with Node Red== |
A [[Node-RED - with InfluxDB|minimum example]] | A [[Node-RED - with InfluxDB|minimum example]] | ||
Revision as of 18:12, 12 March 2023
Originally written by Grant Reed
(you will need curl & gnupg)
Contents
Installing InfluxDB on Mint 19.3 and 20
Start by adding it to the repository
echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
Install GPG Key
sudo curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
Update the index and INSTALL
sudo apt-get update
sudo apt-get install -y influxdb
Start, Enable and Verify it is running
sudo systemctl start influxdb
sudo systemctl enable influxdb
systemctl status influxdb
Installing InfluxDB on Debial
- sudo apt install influxdb
- sudo apt install influxdb-client
Setting up a Database
This will set up an initial database to start with. This gets really deep, really fast if you are not familiar with databases or the coding behind the system. The guide for this can be found at https://docs.influxdata.com/influxdb/v1.8/introduction/get-started/ Good luck with that.
You need to access InfluxDB so open a terminal on the machine it is hosted on (or SSH into it if that is your thing)... type in the terminal
influx
You should see a message like this:
$ influx -precision rfc3339 Connected to http://localhost:8086 version 1.8.x InfluxDB shell 1.8.x >
A fresh install of if InfluxDB has no useable databases outside of the default internal one. So type this at the prompt, replacing <db-name> with the name you want
CREATE DATABASE <db-name>
If all went properly, you won't see any additional info, just the prompt again. Now let's make sure that the database is good just for giggles
SHOW DATABASES
You should see your database listed. If not, something borked and I can't help you with that.
Are you planning to use this with Grafana? You will need to set up a datasource in Grafana then.
Using this with Node Red
Using this with Grafana
Set up your database in Grafana by going here... Connecting with InfluxDB