Introduction
To get Grafana going on the Raspberry Pi, I will assume you already have a Pi up and running. If you want to start from scratch, have a look at the Raspberry Pi operating system
download page. I start this guide by assuming you have at least a minimal, up to date, install (with or without desktop), connected to the network. Like mentioned in the Debian set-up guide, we can use Putty to remotely connect to the Pi and execute all commands by copying/pasting from this guide. For this, make sure SSH is enabled on the Pi, and use the usual pi/raspberry username and password combination to log on. This guide is not for the Pi Zero - it uses a different architecture and needs different binaries.
Installation
In order to install Grafana and related, you need to first add the Grafana repository so apt can find it. To do that, run the following:
sudo apt install -y apt-transport-https gnupg
sudo apt install -y software-properties-common wget
wget -q -O - https://packages.grafana.com/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/grafana-archive-keyring.gpg
sudo cp /usr/share/keyrings/grafana-archive-keyring.gpg /etc/apt/trusted.gpg.d
This last command will print some 'garbage' to the console. Ignore it. Press enter once it's done to have a clean command prompt. Then continue with:
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
Followed by:
sudo apt update
Now we can install the required packages:
sudo apt -y install grafana prometheus prometheus-node-exporter
Almost there. Just run the following two commands to make sure it all starts up, and automatically does so at reboot:
sudo /bin/systemctl enable grafana-server
sudo /bin/systemctl start grafana-server
You should now be able to connect to Grafana (give it a few seconds to start up) with a browser on your Windows side of things, with the following url:
http://192.168.0.11:3000/
Where "192.168.0.11" matches the IP address of your Raspberry Pi. You can log in with the username 'admin' and password 'admin'. You'll be prompted to change your default password, but you can also skip that for the time being.
You can also verify that node-exporter is running by visiting this url:
http://192.168.0.11:9100/metrics
Again, make sure you replace the IP address in the snippet above with yours.
Well done, you've now got the basics up and running!