Grafana

From Torben's Wiki
Jump to navigationJump to search

Install on Raspberry Pi in Raspbian

Howto: [1]

fetch newest release from [2] -> Ubuntu & Debian(ARMv7)

wget https://dl.grafana.com/oss/release/grafana_6.2.5_armhf.deb
sudo dpkg -i grafana_6.2.5_armhf.deb
sudo apt-get update
sudo apt-get install grafana
sudo apt --fix-broken install

in /etc/grafana/grafana.ini set the admin user and password

  1. Start Grafana by running:
sudo service grafana-server start

Autostart at boot time

sudo systemctl enable grafana-server.service
sudo update-rc.d grafana-server defaults

default port: http://raspi:3000


Queries

Display Table of Influx DB data field "active" contains 1 if a given "hostname" is online Query

WHERE time > now()-5m and field(active) != null
SELECT field(active) distinct() alias(online)
GROUP BY time($__interval), tag(hostname)
FORMAT AS Table
Min time interval = 5m

Visualization

Column Style -> Type Hidden for columns named online