Grafana Visualization
Grafana is an open platform for beautiful analytics and monitoring. It allows you to create nice-looking dashboards that will give you quick insights into your sensor data.
Install Grafana
- Linux
- macOS
info
First, you will need to install InfluxDB.
Start by installing all the needed packages
sudo apt install apt-transport-https curl -y
Add the repository key
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
Add repository to the source list
- Debian
- Ubuntu
echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
echo "deb https://repos.influxdata.com/ubuntu/ xenial stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
Install the InfluxDB Package
sudo apt update && sudo apt install influxdb
Start the InfluxDB Service to test it
sudo systemctl start influxdb
info
After you tested the InfluxDB, you can move to Grafana.
Install Grafana Dependencies
sudo apt install adduser libfontconfig -y
Install Grafana
- Raspberry Pi
- Desktop
Enable Grafana on Boot
sudo systemctl daemon-reload
sudo systemctl enable grafana-server
Test Grafana
sudo systemctl start grafana-server
caution
Make sure you have Homebrew installed.
info
First, you will need to install InfluxDB.
Install InfluxDB and Enable It
brew install influxdb
brew services start influxdb
info
After you installed the InfluxDB, you can move to Grafana.
Install InfluxDB and Enable It
brew install grafana
brew services start grafana
Configure Grafana
To configure Grafana, you will first have to open it and log in:
- http://localhost:3000/ - Grafana is running on your local machine
- http://hub.local:3000/ - Grafana is running on your Raspberry Pi with our Hub installed
- http://"IP address":3000/ - Grafana is installed on your device, you should know the IP address of that device
info
Default User is admin
.
Default Password is admin
.
Create a Data Source
Select Add Data Source and fill the data
- Enter the Name:
node
- Select the Type:
InfluxDB
- Enter the URL: http://localhost:8086
- Enter the Database:
node
- Click at
Save & Test
button to check if everything is OK. You should se same green notification as on the picture.
Import dashboard
Download dashboard.json and import it to Grafana
- Click the Grafana icon on the top left (1)
- Click at the + icon to expand submenu (2)
- Click at the Import (3)
- Click at the Upload .json File (4)
- Choose your JSON file (in our case dashboard.json) (5)
- Select file to upload (6)
- Select you database (7)
- Click at the Import button (8)
- Your dashboard is imported.