Grafana Cloud for Raspberry Pi (RPi-Monitor alternative)

Grafana Cloud for Raspberry Pi (RPi-Monitor alternative)

For years I've used the RPi-Monitor app to monitor my Raspberry Pi, but like the torrent client replacement, I'm trying something new this year. I found a solution where we send the data to the cloud instead of storing it locally, which has both advantages and disadvantages.

Advantages compared to RPi-Monitor

  • Available statistics from outside the local network
  • Nice dashboard and graphs
  • Does not take up space on Raspberry Pi
  • Only 14 days of history on a free plan

Disadvantages compared to RPi-Monitor

  • Temperature monitoring not easy to implement
  • You can't monitor your Raspberry Pi without an internet connection
  • Monitoring depends on the availability of the Grafana service

 

Installation

  1. Sign Up on Grafana Cloud (Free account)

  2. Go to your custom Grafana dashboard

  3. Select "Integrations and Connections" from the left menu

  4. Choose "Linux Server"

  5. Select "Other Distribution" as an OS

  6. Run these commands instead of step #3 ones:
    cd /home/pi

    curl -O -L "https://github.com/grafana/agent/releases/latest/download/agent-linux-armv7.zip"

    unzip "agent-linux-armv7.zip"

    chmod a+x "agent-linux-armv7"

  7. Continue with #4 (there is a copy button, use it)

  8. Try the agent by running it in the terminal:
    ./agent-linux-armv7 --config.file=agent-config.yaml

  9. Press "Test integration", and wait a few minutes (be patient)

  10. If it works, you will see something like that:
  11. Check the Dashboard. If you like it, let's continue

  12. Create a user for Grafana Agent
    sudo useradd --no-create-home --shell /bin/false grafana-agent

  13. Create service file
    cat <<EOF > /etc/systemd/system/grafana-agent.service
    [Unit]
    Description=Grafana Agent

    [Service]
    User=grafana-agent
    ExecStart=/home/pi/agent-linux-armv7 --config.file=/home/pi/agent-config.yaml
    Restart=always

    [Install]
    WantedBy=multi-user.target
    EOF

  14. Start and enable the service
    sudo systemctl daemon-reload

    sudo systemctl start grafana-agent.service

    sudo systemctl enable grafana-agent.service

  15. That's all, done.

 

For more Raspberry Pi articles click here

Comments