elfhosted / enhancements

This repository collects "Elf Enhancement Proposals" (EEPs!)
0 stars 0 forks source link

Add Zurg stats to Homer dashboard #2

Open funkypenguin opened 1 week ago

funkypenguin commented 1 week ago

We used to display disk usage stats on our Homer dashboards, but these were disabled due to the I/O load they added, and now with the demise of ElfStorage, they're irrelevant anyway.

I thought it would be more useful to display the user's RD stats (as scraped from Zurg, which now has a .json endpoint), as described at https://github.com/bastienwirtz/homer/blob/main/docs/tips-and-tricks.md#get-the-news-headlines-in-homer

Our original disk calculations and JSON creation can be found here: https://github.com/elfhosted/myprecious/blob/d8f752025a4f4d5f70e38612c57b1851eabc9d37/charts/myprecious/templates/configmaps/configmap-homer-config.yaml#L29

While we could potentially scrape the Zurg API directly with homer, I thought it might make more sense to resurrect the old code, but to alter it to pull stats on an interval. This way, we could still display useful information for non-Zurg users, add more details like a temporary announcement, etc.

Changes should be testable running a local instance of Homer :)