Re:Real-Time HN Trends as a Grafana Dashboard
by jovezhong on Friday January 26, 2024 @07:09PM
(#39150708)
The overall setup process was great. I can simply use the latest Grafana docker image, and use the environment variable to install the extra plugin (timeplus-proton-datasource) and load pre-defined data source and dashboards as yaml. Grafana was one of the few dashboard systems that support live charts over WebSocket (https://grafana.com/docs/grafana/latest/setup-grafana/set-up...) But that mainly work for append-only data. Say every x seconds, there is a new counter. When I need to show the top 5 most active HackerNews users, if I want to auto-refresh this every X seconds, it's not easy to do with Grafana Live. I endedup with using special `limit 5 by emit_version()`, then use a Grafana transformation to order by emit_versio() desc and pick up the top 5 (check the code if you're curious https://github.com/bytewax/hacking-hacker-news/blob/main/gra...)
Kind of a hacky workaround.
This could be a good reason to explain why in Timeplus Cloud we built our own charting component, to support various render modes.
Re:Real-Time HN Trends as a Grafana Dashboard
by vidamon on Friday January 26, 2024 @02:05PM
(#39146614)
This would make a great submission for Grafana's Golden Grot Awards - you should apply. And if you win, Grafana will fly you out to Amsterdam for GrafanaCON April 9-10 where you'll get to showcase your dashboard.
Kind of a hacky workaround.
This could be a good reason to explain why in Timeplus Cloud we built our own charting component, to support various render modes.
https://grafana.com/about/events/grafanacon/2024/golden-grot...
(I work for Grafana)
You can run `docker compose up` to get everything up running within few minutes. Or check this public demo server at http://hn.demo.timeplus.com/d/d299c092-7bda-4a37-ba1d-5f484f...