Grafana Stack

Install Grafana on Raspberry Pi (Raspbian)

  1. Download the appropriate .deb file from the following git repository https://github.com/fg2it/grafana-on-raspberry.git
  2. Install the package (e.g. sudo dpkg -i grafana_3.1.0-1466707812beta1_armhf.deb)
  3. To run Grafana as a service then do the following:
    • sudo /bin/systemctl daemon-reload

    • sudo /bin/systemctl enable grafana-server

    • sudo /bin/systemctl start grafana-server

  4. Test that it all works by connecting to the Grafana URL (e.g. http://192.168.1.35:3000/)
NOTE: The default login credentials are admin / admin

Install Telegraf on Raspberry Pi (Raspbian)

  1. In the downloads folder of home (/home/pi/Downloads) download the .deb file (e.g. curl -O https://dl.influxdata.com/telegraf/releases/telegraf_1.0.0-beta3_armhf.deb)
  2. Install the package (e.g. sudo dpkg -i telegraf_1.0.0-beta3_armhf.deb)
  3. To run Telegraf as a service then do the following:
    • sudo /bin/systemctl daemon-reload

    • sudo /bin/systemctl enable telegraf

    • sudo /bin/systemctl start telegraf

  4. Test that it works by running telegraf -help
NOTE: The config file is located at /etc/telegraf/telegraf.conf

Install InfluxDB on Raspberry Pi (Raspbian)

NOTE: The below assumes that InfluxDB is being installed as user pi
  1. Download the latest tar file (e.g.wget https://dl.influxdata.com/influxdb/releases/influxdb-0.13.0_linux_armhf.tar.gz)
  2. Untar the file (e.g.tar xvfz influxdb-0.13.0_linux_armhf.tar.gz)
  3. Run sudo mv influxdb-0.13.0-1 /opt/influxdb-0.13.0-1
  4. Run sudo ln -s /opt/influxdb-0.13.0-1 /opt/influxdb
  5. To run InfluxDB as a service then do the following:
    • Run cd /opt/influxdb/usr/lib/influxdb/scripts/
    • For both init.sh and influxdb.service:
      •  Run chmod +x to give execute permissions
      • Edit the files and change both USER and GROUP to be pi
    • Run sudo ln -s /opt/influxdb/usr/bin/influxd /usr/bin/influxd
    • Run sudo ln -s /opt/influxdb/usr/lib/influxdb /usr/lib/influxdb
    • Run sudo ln -s /opt/influxdb/etc/influxdb /etc/influxdb
    • Run sudo ln -s /opt/influxdb/usr/lib/influxdb/scripts/init.sh /etc/init.d/influxd
    • Run cd /etc/init.d
    • Run sudo update-rc.d influxd defaults
    • Run sudo /bin/systemctl daemon-reload
    • Run sudo service influxd start
      • If it fails due to permissions issues then:
        • Run cd /var/run
        • Run sudo chown -R pi influxdb
        • Run sudo chgrp -R pi influxdb
        • Run cd /var/log
        • Run sudo chown -R pi influxdb
        • Run sudo chgrp -R pi influxdb
        • Run cd /var/lib
        • Run mkdir influxdb
        • Run sudo chown -R pi influxdb
        • Run sudo chgrp -R pi influxdb
    • Test that it works by connecting to the Admin Interface (e.g. http://192.168.1.35:8083/)
NOTE: The logs are located in /var/log/influxdb

To avoid “404 page not found” when Micrometer tries to send data
to influx the following changes were needed in the config file:

# Bind address to use for the RPC service for backup and restore.
bind-address = "127.0.0.1:9011"

In [http] section
# The bind address used by the HTTP service.
bind-address = ":9017"
Advertisements