Site /
InfluxDBAndGrafanaOnRaspberryPi
InfluxDB And Grafana On RaspberryPi
The server:
- a Raspberry Pi 3 B
- Four 1.2 GHz CPU & 1 GB RAM
Raspberry Pi running:
- Ubuntu 18.04.2 plus apt upgrade - for all the newer fixes
- InfluxDB 1.7.5
- from Influxdata.com
- Grafana 6.1.3
- from Grafana.com
- Influx client 4.1.1 = python module
= all blog standard, latest releases from the web
Install
OS for Raspberry Pi 3B
- from https://wiki.ubuntu.com/ARM/RaspberryPi
- file ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz
InfluxDB 1.7.5
- from Influxdata.com
- wget https://dl.influxdata.com/influxdb/releases/influxdb-1.7.5_linux_armhf.tar.gz
- gunzip & tar & cp influx*/usr/bin/influxd /usr/local/bin
- Also cp the "influx" command this is the CLI access to InfluexDB
- run: /usr/local/bin/influxd 1>influxd.out 2>influxd.err &
- Create a database:
run: /usr/lobal/bin/influx create database njmon show dtabases exit
Grafana 6.1.3
- from Grafana.com
- wget https://dl.grafana.com/oss/release/grafana_6.1.3_arm64.deb
- sudo apt install libfontconfig1
- sudo dpkg -i grafana_6.1.3_arm64.deb
- sudo /bin/systemctl daemon-reload
- sudo /bin/systemctl enable grafana-server
- Browse to this server and use port 3000 like http://myserver.com:3000
- and add a datasource to Influx
Influx client 4.1.1
- python module
- sudo apt install python-pip
- sudo apt install python3-influxdb (don.t forget the .3. for python version 3)
To collect the njmon you will need njmon match the endpoint operating system Also the njmon injector.py python3 program for taking njmon .json files and adding the data to InfluxDB
Either the ssh method or also set up njmon_collector so njmon can directly send the data to the InfluxDB server.
For Alerts - get email working on the Grafana Server (here InfluxDB and Grafana run on the same Server.