InfluxDB

From The TinkerNet Wiki
Revision as of 13:39, 1 December 2020 by Grant (talk | contribs) (Created page with "==Installing InfluxDB on Mint 19.3 and 20== ===Start by adding it to the repository=== <code>echo "deb <nowiki>https://repos.influxdata.com/debian</nowiki> stretch stable" |...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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 Grafana

Set up your database in Grafana by going here... Connecting with InfluxDB