What is Grafana? Grafana is the software that is used to graph and make pretty pictures out of all the data collected by Prometheus. It’s relatively straightforward to install and there’s an ARM version already built and ready for download on their website!
First, do your usual updates:
apt update apt upgrade
Let’s install the APT key and the repo. The APT key is used to verify the packages actually came from the Grafana server and have been signed as such. To add the Grafana APT key to your Raspberry Pi’s keychain, run the following command:
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
The Raspberry will reply with a simple: OK
Now add the repo with this one-liner:
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
The Raspberry echos the line that it just added to the sources directory. Having added a new repo, you’ll need to run update again:
Now, we can install Grafana, enable it, and run it (as root):
apt install grafana systemctl daemon-reload systemctl enable grafana-server systemctl start grafana-server
We have Grafana installed (and running)! I installed it on my prometheus server, your hostname may vary. Go to this URL:
and you’ll get the Grafana login page:
The default login is admin/admin Once you’ve authenticated, you’ll be presented with a nice collection of tutorials. You can click on the leftmost one and work your way through them. I won’t try to replicate it here. Clicking that box will open a new browser tab to grafana.com. Hey, and guess what! I’ve given you a head start. Skip all the docker stuff and click on Step 4, where you’ve already installed it and logged in! Note, the tutorial thinks you’re running in docker on your localhost, so you’ll have to type in the name of your prometheus raspberry. Have fun!