Install an InfluxDB Grafana stack on a Raspberrypi: Difference between revisions

From lechacal
Jump to navigation Jump to search
No edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:


Guide was edited and tested using Raspbian image:
This link below is an excellent resource for installing Influxdb/Grafana on a Raspberrypi
2018-11-13-raspbian-stretch-lite.img


==Install Influxdb==
[https://simonhearne.com/2020/pi-influx-grafana/ Installing InfluxDB & Grafana on Raspberry Pi]


Access a terminal on the Raspberrypi and enter the commands below to install InfluxDB.
THIS APPLIES ONLY FOR VERSION 1 OF INFLUXDB.  


curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
At time of writing there is no known installation of Infludb 2 for Raspberrypi. If you want to use Influxdb 2 then use Ubuntu OS instead.
sudo apt install apt-transport-https
echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo apt-get update
sudo apt-get install influxdb
 
==Setup Influxdb Config==
 
Edit the config file.
sudo nano /etc/influxdb/influxdb.conf
 
Change the options as shown below.
[http]
  # Determines whether HTTP endpoint is enabled.
  enabled = true
  # The bind address used by the HTTP service.
  bind-address = ":8086"
  # Determines whether user authentication is enabled over HTTP/HTTPS.
  auth-enabled = false
 
Restart InfluxDB service.
sudo service influxdb restart
 
==Install Grafana==
 
curl https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -
echo "deb https://dl.bintray.com/fg2it/deb jessie main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
sudo apt-get update
sudo apt-get install grafana
sudo service grafana-server start
# sudo update-rc.d grafana-server defaults
sudo systemctl enable grafana-server
 
==Setup Grafana==
 
Using a computer on the same network of the Raspberrypi. Open a web browser and go to address
 
http://raspberrypi:3000
 
Grafana will show up.
Login using '''user''' admin '''password''' admin.
 
Go to '''Configuration''' | '''Data Sources'''
 
Then click '''Add data sources'''.
 
Enter:<br>
'''Name:''' raspberrypi<br>
'''Type:''' InfluxDB<br>
'''URL:''' http://localhost:8086<br>
'''Database:''' db01<br>
 
Keep everything else by default. Name must be the raspberrypi hostname. Database can be anything you like.

Latest revision as of 19:12, 12 August 2021

This link below is an excellent resource for installing Influxdb/Grafana on a Raspberrypi

Installing InfluxDB & Grafana on Raspberry Pi

THIS APPLIES ONLY FOR VERSION 1 OF INFLUXDB.

At time of writing there is no known installation of Infludb 2 for Raspberrypi. If you want to use Influxdb 2 then use Ubuntu OS instead.