#The Humble Homelab Dashboard

3 messages Β· Page 1 of 1 (latest)

coral ingot
#

On Friday, I was inspired to take on a new project as an attempt to touch up on Go (the programming language). My original goal was to render some kind of virtual representation of the blinking HDD LED of each of my servers and nodes (such as my Raspberry Pis). So I used an event stream to push events from each of my servers to a central node, which would then stream that to a browser using SSEs. And then it sort of snowballed into becoming a dashboard for all sorts of telemetry and then eventually real-time notifications.

So, after a fun weekend of experimentation, I was able to finally polish it up into something functional and useful that I wanted to share with the community and see what you thought of it.

The architecture consists of three components:

  • The agent (called event-pulsar - built in Go), which you install on each node you want to observe
  • The central broker (called event-terminal - built in Go), which accepts messages from and relays them
  • And, finally, the dashboard (HTML, Vanilla JavaScript, Tailwind)

And with that said, here's the demos:

The backend Go components and the frontend dashboard are decoupled by design (no server-side rendering), so anyone could create their own dashboard with little friction and without knowing a line of Go.

More details in the comments.

#

Some perks to this architecture:

  • Discovery: All the configuration is in the event-pulsar nodes (via cli arguments or in a dotenv file). You just need to point them to the event-terminal's URL and they will automatically be discovered by the dashboard as a newly registered machine/device.
  • Efficient: Because event-terminal broadcasts events to the dashboard using SSE rather than the dashboard polling the backend, it is resource efficient and low latency.
  • Multi-Arch: Go by design can compile to many different architectures/platforms with relative ease. For my own purposes, I compile to AMD64, i386, ARMv7 and ARM64 and the compiler does all of the hard work (Go is so awesome this way). I designed this mainly with Linux in mind since this was a weekend project to scratch a personal itch, but, I'd love to see Windows and MacOS support in the future if there is any interest.

Room for improvement:

  • Refactoring: It was a weekend project with a lot of trial and error and iterating and backtracking. The code could definitely be refactored and improved. I am aware of that. But I am happy with the foundation and core concepts overall. πŸ™‚
  • Granularity: Right now, the agent just looks for any disk activity and aggregates it into a single HDD LED "pulse". For server-grade hardware, I could see someone wanting to have a visual pulse per drive. This is high on my TODO list.
  • Device Support: I've pondered whether it makes sense to include supporting other types of Homelab devices, like visualizations for routers (OpenWrt/DD-Wrt).
#

Why I think this is cool

There is something I love about the idea of having a "living" dashboard. That, at a glance, I can look at my servers and see one blinking like crazy and be like "Oh, right, duplicati is backing up Immich" or noticing a notification stating that "all Pi-hole lists have been updated."

I also threw in a "Reticulator" script. If things are quiet, the dashboard fires off random SimCity 2000 messages like "Reticulating splines..." or "Calculating llama trajectories..." just to keep things feeling alive and fun, but that is entirely optional.

This is by no means intended to replace any other observability tools/platforms, but it is also designed to prevent you from being overwhelmed by a load of metrics, complicated UI/UX and complex setup/configuration.

Note on hosting: The live demo is currently running on a single Raspberry Pi 3B+. I believe I have optimized my system and the Pi to be able to handle the traffic, but, if the site is down, let me know. I can move it to a more powerful server if need be.

Anyways, hope you like it!