IoT with InfluxDB, Telegraph and Grafana on the Raspberry Pi 라즈베리 파이


파이 버전이 3는 아니지만 일단 시도.

IoT with InfluxDB, Telegraph and Grafana on the Raspberry Pi 3

Article_InfluxDB_Grafana_v2

In the internet I stumbled on the following beautiful Grafana Dashboard and wanted to try it out myself, of course.

So I will describe here like me

  • InfluxDB, as a database
  • Telegraph as a collector
  • Grafana as visualization
have installed.

1. Install InfluxDB

The data is all collected in the InfluxDB. The current version can be found here .

1
2
3
4
wget https://dl.influxdata.com/influxdb/releases/influxdb_1.2.2_armhf.deb
sudo dpkg -i influxdb_1.2.2_armhf.deb
sudo systemctl enable influxdb
sudo systemctl start influxdb

This will install InfluxDB in version 1.2.2, activate the automatic start and start the database.

1
2
3
4
5
6
pi@raspberrypi:/etc/telegraf $ influx
 Connected to http://localhost:8086 version 1.2.2
 InfluxDB shell version: 1.2.2
 > CREATE USER admin WITH PASSWORD '' WITH ALL PRIVILEGES
 > CREAT DATABASE telegraf
 > exit

With this we create a user admin and show the later used database.

1
2
3
4
5
sudo vi /etc/influxdb/influxdb.conf
[http]
 enabled = true
 bind-address = ":8086"
 auth-enabled = true

Through this customization in influxdb.conf, we enable authentication. These three parameters under [http] should be checked and adapted accordingly.

1
2
sudo systemctl restart influxdb
influx -username admin -password password

2. Install the telegraph

Telegraph is the collector and fetches all data via SNMP from the access points. Of course, SNMP and the corresponding community string must be configured in the UniFi Controller. The current version can be found here .

1
2
wget https://dl.influxdata.com/telegraf/releases/telegraf_1.2.1_armhf.deb
sudo dpkg -i telegraf_1.2.1_armhf.deb

This will load you Telegraph and then install it.

1
2
3
4
wget https://github.com/WaterByWind/grafana-dashboards/archive/master.zip
unzip master.zip
sudo cp grafana-dashboards-master/UniFi-UAP/mibs/* /usr/share/snmp/mibs
sudo apt-get install snmpd

For telegraph to evaluate the data, the MIBs must be installed and snmpd. The MIBs are already included in the GitHUB repository of the dashboard and just need to be copied.

Then telegraph must be configured.

Here is my entire telegraph.conf. The sections Input and Output are important. Everything marked in red you have to adjust. If you already use a telegraph instance, you can supplement your config with the corresponding data, that is, the complete input section at least.

이하 생략 ...


덧글

댓글 입력 영역

Google Analytics