-
Notifications
You must be signed in to change notification settings - Fork 0
Time Stack Notes
Dayne Broderson edited this page Oct 11, 2021
·
10 revisions
General steps
- install dependencies: mosquitto, Influx, Grafana
- setup a time-series database
- setup grafana with the database
- add the database to node-red
- stream data to the database
- create dashboard
Always good to start with an up-to-date system:
sudo apt update && sudo apt upgrade -y
sudo apt install mosquitto mosquitto-clients -y
sudo systemctl enable mosquitto
sudo system start mosquitto
One that is complete you've got a mosquitto MQTT server running on localhost.
sudo apt install influxdb
sudo systemctl enable influxdb
sudo systemctl start influxdb
sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
echo "deb https://packages.grafana.com/enterprise/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
sudo apt-get update
sudo apt-get install grafana
sudo systemctl daemon-reload
sudo systemctl start grafana-server
sudo systemctl enable grafana-server.service
sudo systemctl status grafana-server
Head over to your system on port 3000 and login as admin/admin and change the password.
The configuration file /etc/influxdb/influxdb.conf can be used to enable/disable lots of features.
You can connect to the influx server command line console by typing influx whereupon you can do a few key comments;
show databasesuse <a database>create <a database>
See the query language spec for more details.
influx
> show databases
# If you don't have a database named `testing` create one:
> create database testing
> use database testing
Login to grafana on port 3000.
Configuration menu (sidebar) -> Data Sources -> Add data source -> InfluxDB URL: HTTP://localhost:8086 Database: testing