telegraf, inflluxdb and grafana installation - SparkGrads2016/envmonitorSpark GitHub Wiki
This provides an alternate to Splunk. By using these three programs, the aggregation and visualisation of the environmental and internal Pi data can be viewed.
Telegraf
Installation
Install the latest debian version of Telegraf on the Raspberry Pi:
https://github.com/influxdata/telegraf
wget https://dl.influxdata.com/telegraf/releases/telegraf_1.0.0-beta1_amd64.deb
sudo dpkg -i https://dl.influxdata.com/telegraf/releases/telegraf_1.0.0-beta1_amd64.deb
Enter command "sudo service telegraf" to use Telegraf
sudo service telegraf ________
Data and Format
In order to get the environmental and internal Pi data, two scripts will be used:
- envData.sh: A script which functions to call a python script that collects environmental data
- internalStats.sh: Collects internal data from the RPi
The data is required to be formatted in a specific way in order for InfluxDB to accept it. More information about this can be found on the Influx site:
https://github.com/influxdata/telegraf/tree/master/plugins/inputs/exec
Setup
Telegraf is entirely plugin driven, hence all modification of the program is done through the telegraf.conf file.
sudo nano /etc/telegraf/telegraf.conf
Output Plugins
Under outputs.influxdb edit four fields:
- urls: The URL of the InfluxDB server
- database: The name for the database
- username: The user of the InfluxDB
- password: The password of the user
Input Plugins
Under inputs.exec edit the following fields:
- commands: Specify the locations of the shell scripts here
- timeout
- name_suffix
- data_format
InfluxDB
Installation
Install the latest version of InfluxDB onto the server.
Follow the Ubuntu and Debian instructions from the Influx website:
https://docs.influxdata.com/influxdb/v0.9/introduction/installation/
Grafana
Installation
Install the latest version of Grafana onto the server.
Follow the Ubuntu and Debian instructions from the Grafana website: