article

dunnp avatar image
dunnp posted

Docker Grafana dashboards on Raspberry Pi

I have been running Grafana dashboards on Windows machines for some time but wanted to use a Raspberry Pi as the 'server' in my caravan. But I struggled with docker-compose and gave up several months ago and just used an Intel NUC running Windows 10 instead.

After reading a new post here a few days ago, I decided to have another go and - bingo - got Grafana dasboards working on a Pi 3B+.

Initially it failed again (cryptic error messages that meant nothing to me), so as one last attempt, I started afresh with a brand new SD card image with the latest OS - and it all installed perfectly. (I had been experimenting with that Pi with various other programs, so I suspect one or more were conflicting the docker and/or docker-compose installation).

Here is a copy of my installation notes for those interested....

Installing Docker/Grafana on Raspberry Pi

Starting with a clean installation of RaspberryOS…

  • Install Docker – sudo apt install docker
  • Install Docker Compose – sudo apt install docker-compose
  • Add pi user to docker group – sudo usermod -aG docker pi
  • Reboot (to force group change above)
  • Create a Victron directory – mkdir Victron
  • Change to that folder – cd Victron
  • Copy your docker-compose.yaml file (downloaded from github) to the Victron directory
  • Run the installer – docker-compose up -d
  • Once finished (5-10mins), open a browser.
  • Browse to http://localhost:8088 and login (admin and admin)
  • Go to configuration, VRM and enter your VRM credentials to login. Your VRM-connected systems should then be visible.
  • Select the system (enable it).
  • Open Grafana – http://localhost:3000 (login is admin & admin). Your system(s) should appear under Devices.
  • Change to Dashboards and open the sample Venus Dashboard to confirm all is working.
  • Import any previously developed dashboard JSON files and start tweaking.

NB – some of the beta visualisation plugins seem to be missing on the Pi version as compared to the latest Windows version (eg the bargraph).


My slightly modified docker-compose.yaml file (added restart: commands) looks like this...

version: '3.4'

services:

server:

image: "victronenergy/venus-docker-server:latest"

ports:

- "8088:8088"

volumes:

- "config-storage:/config"

restart: always

upnp:

image: "victronenergy/venus-docker-upnp:latest"

network_mode: host

restart: always

influxdb:

image: "influxdb:1.7"

ports:

- "8086:8086"

volumes:

- "influxdb-storage:/var/lib/influxdb"

environment:

- INFLUXDB_HTTP_LOG_ENABLED=false

restart: always

graphing:

image: "victronenergy/venus-docker-grafana:latest"

volumes:

- "grafana-storage:/var/lib/grafana"

ports:

- "3000:3000"

restart: always

volumes:

influxdb-storage:

grafana-storage:

config-storage:


Cheers

Phil

Raspberry Pigrafana
15 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

xemoterp avatar image xemoterp commented ·

Is there a problem with running the current version of the venus-docker-grafana container for the Raspberry PI? All four containers start, but the grafana one exits right away. If using "restart: always" as in the yaml file above, the service starts and stops after a second and then restarts/stops ....

Tried using Raspian OS on a RPI 3 and also Ubuntu on an Odroid XU4 - so I know it is not a particular OS version (both are 32 bit Armf BTW).

I can get to the admin page for setting up the data feed from my Victron Venus OS - can see it obtain data (ie: localhost:8088 works fine). Cannot reach localhost:3000 because the docker contain for victron-docker-grafana will not stay running - it shows an Exit(1). Have not yet logged it.

0 Likes 0 ·
nillerk avatar image nillerk xemoterp commented ·

I am having the same problem on a Raspberry Pi 4. Have you made any progress?

0 Likes 0 ·
nillerk avatar image nillerk nillerk commented ·

Got it working.

Change:

victronenergy/venus-docker-grafana:latest

to

victronenergy/venus-docker-grafana:2.0.0

0 Likes 0 ·
sureshskr avatar image sureshskr nillerk commented ·

I tried but its failing to download getting error

1623871440697.png


0 Likes 0 ·
1623871440697.png (24.7 KiB)
sureshskr avatar image sureshskr sureshskr commented ·

docker-compose.zip working docker compose file

0 Likes 0 ·
sureshskr avatar image sureshskr sureshskr commented ·

Starting with a clean installation of RaspberryOS…

  • Install Docker – sudo apt install docker
  • Install Docker Compose – sudo apt install docker-compose
  • Add pi user to docker group – sudo usermod -aG docker pi
  • Reboot (to force group change above)
  • Create a Victron directory – mkdir Victron
  • Change to that folder – cd Victron
  • Copy the attached docker-compose.yaml file to the Victron directory (Use Filezilla client from your PC to Rpi to specified directory)
  • Run the installer – docker-compose up -d
  • Once finished (5-10mins), open a browser.
  • Browse to http://localhost:8088 and login (admin and admin)
  • Go to configuration, VRM and enter your VRM credentials to login. Your VRM-connected systems should then be visible.
  • Select the system (enable it).
  • Open Grafana – http://localhost:3000 (login is admin & admin). Your system(s) should appear under Devices.
  • Change to Dashboards and open the sample Venus Dashboard to confirm all is working.
  • Import any previously developed dashboard JSON files and start tweaking.
0 Likes 0 ·
gregmmm avatar image gregmmm commented ·

Is anyone else having issues getting venus-docker-grafana to connect with the VRM portal?

After several weeks of venus-docker-grafana working flawlessly accessing my VRM data I am currently unable to log in with my credentials in the "Configuration - VRM" page.

Data was being saved to influxdb and displayed in the dashboard I put together in grafana... all was working well.

I am running a RPi 3B+ on the most current raspberry Pi OS with all current updates.

I suspect that the most recent apt-get update/upgrade I ran may have been the culprit...even though there were no errors during the update. Venus-docker-grafana was working fine until the update I ran.

I've rebuilt my Pi3B+ several time now following the detailed instructions above each time to get venus-docker-grafana running.

I tried rebuilding things without running any updates for raspberry pi OS to no avail.

The docker compose file runs without any errors and I'm able to log in to localhost:8088 using Chome as my browser using the default admin/admin credentials after completing the installation.

My trouble starts when I enter my VRM credentials in the configuration tab. .. the "logging in" notification sits there until it times out after failing to connect to the VRM portal.

I have the VRM toggle enabled while trying to log into VRM.

On the troubleshooting page the a "venus-server" error is present..... "connect ECONNREFUSED 172.18.0.2:8086".

I'd upload a screen cap but I'm new to this forum and don't seem to be able to post/upload images yet.

I don't recall seeing this error when I was previously able to log into VRM normally. Is this error related to my issues logging into the VRM portal?

I know my VRM credentials are valid and working as I can log into the VRM web portal and access my live data but I am unable to get venus-docker-grafana to log into VRM.

Has anyone else encountered the above described issue recently. If so, is there a fix? Is this an issue with the docker compose file or on the Victron side of things?Configuration - VRM Credentials.png

0 Likes 0 ·
dunnp avatar image dunnp gregmmm commented ·

Yes - seeing the same problem on PC version. It looks like something broke on or about 1st October (judging by a 30day graph I had running). Perhaps to do with the certificate expiry issue mentioned in media. Only guessing.

I have no idea where to look. Hopefully someone knows the answer.

Phil

0 Likes 0 ·
gregmmm avatar image gregmmm dunnp commented ·

Out of curiosity do you have a source/link for the media you mention? Is there a thread somewhere on this forum?

0 Likes 0 ·
dunnp avatar image dunnp gregmmm commented ·

I saw it on local TV news channels just before the end of Sept. Basically a story warning that some network devices may stop working because their certificates will expire. Sorry - a bit vague. Phil

0 Likes 0 ·
Show more comments
new-energytoday avatar image new-energytoday commented ·

Thanks for sharing this information! It works fine.

The only thing is, when I follow these steps, Grafana v7 is installed. I would like to run Grafana v8 because of its nice new functionalities. Any idea how I can update Grafana?

Grtz Wim

0 Likes 0 ·
k0s avatar image k0s new-energytoday commented ·

hey Did you manage to upgrade to any newer version of grafana?
I am really stuck here :(

I would appreciate any help :)

Thanks and have a great WE!

Dee

0 Likes 0 ·
miya avatar image miya commented ·

Hi All

Can anyone help - I am struggling here.

I have had docker, InfluxDB and Grafana all working fine on a mac and a PC - loving it ! So I have now tried to get it up and running on a Rasp Pi 3 following instructions on this thread.

All going well - connected up to VRM from localhost:8088 -

screenshot-2021-12-31-at-151350.png

and can see data flying in from VRM.

All going well until I try launching Grafana from the link provided (above) in localhost:8088 or by directly trying to access localhost:3000 in a browser. Either one results in 'this site cant be reached'.

screenshot-2021-12-31-at-151404.png

I have checked docker is running - screenshot-2021-12-31-at-151508.png

all looks OK to me.

Can anyone help please ??

Many thanks, Tim

0 Likes 0 ·
miya avatar image miya miya commented ·

Ignore me !!! Just followed Nillerk's advice - to change grafana:latest to grafana:2.0.0.

Working !


0 Likes 0 ·

Article

Contributors

dunnp contributed to this article