Settings

Theme

Show HN: Grafana Live Streaming Datasource Implementation

github.com

120 points by seanlaff 7 years ago · 14 comments

Reader

dkhenry 7 years ago

I saw this presentation at grafanacon and it was awesome. I really hope the team takes this and turns it into a first class feature.

kthejoker2 7 years ago

Very cool, but real time visualization use cases are surprisingly hard to concoct. Almost any signal worth capturing visually at one second or sooner intervals would be better served through automation.

For example, all SCADA systems already have command and control alerting for instant degradation response.

  • seanlaffOP 7 years ago

    Agreed, watching dashboards is no substitute for alerting. However, one of the motivators for doing this is to reduce pressure on the metric backend. It's common to have Grafana reports refresh at 5s intervals, which if you have sub-second data, means that you request the same (potentially tens of thousands of) points over and over again. Some have worked around this by adding a caching layer (see https://github.com/Comcast/trickster), but streaming feels more elegant :)

    • rixed 7 years ago

      Exactly this. Especially in an environment where you have tens or hundredths of people/screens with the dashboard opened.

      Non streaming dashboards are just stupidly hammering the backends (and the network transferring the same data over and over). So this has nothing to do with how cool it looks (also dashboard users rarely complain that they refresh or scroll too fast).

      Working on such a backend at the moment, I was missing this feature so much I would probably have started to work on this on my own at some point.

  • iluminae 7 years ago

    Also think about having a dashboard refresh at 5s with 50k datapoints, literally transferring gigabytes of data to every browser looking at that dashboard. If you streamed the data (even at slow rates) it would be a massive traffic savings.

    • minimaxir 7 years ago

      Recently I was looking into Plot.ly Dash (https://plot.ly/products/dash/) for a Python-based real-time updating dashboard.

      ...until I noticed that it transfers the entire chart and all the datapoints each update. (example: https://dash-gallery.plotly.host/dash-live-model-training/)

      • nicolaskruchten 7 years ago

        I'll be honest, before I started working at Plotly I had the same reaction to Dash at first glance, but as I worked with it/on it, I realized that most of the time, this client-server chattiness is not much of a problem from a user perspective, and is a great developer-productivity tradeoff.

        More to your point, though, this is something we're trying to address in collaboration with the Dash community, in this PR for example if you want to follow along: https://github.com/plotly/dash-core-components/pull/461

      • doctorpangloss 7 years ago

        It's funny, we already have a format for transferring graphical data in real time that the web has optimized relentlessly: video!

        You'd think someone would just run a daemon local to the data that live-streams a compressed video feed rendering the graph, instead of relentlessly and repeatedly reinventing some notion of lossy-but-useful realtime data transferring technology.

    • dkhenry 7 years ago

      This was the thing I liked the best about it. Even if you wanted to not make it "real time" making it so I didn't have to transfer all my data every refresh would be benefit enough.

  • kthejoker2 7 years ago

    And not helped by placating BI vendors conflating "real time" (with a precise technical definition) with something akin to "zero friction" self service analytics platforms (you can start to answer a question as soon as you can conceive it.)

    Cf https://www.sisense.com/blog/dont-real-time-analytics-insigh...

rixed 7 years ago

After having looked at what this actually is, I'm a bit disappointed. I was hopping that they wound change the various panels data API so that they would request only the new time slices; ie. instead of querying the last hour of data every minute, query the last minute every minute and reuse the previous 49 data points. But that's not what this is. Instead, you need a specific panel and a specific data source for streaming to work. :-(

  • seanlaffOP 7 years ago

    This datasource doesn't require any custom panels to function. To your point though, it would be nice if grafana supported incremental time range querying out of the box, since many backends don't support streaming data.

    • nopzor 7 years ago

      Something we are looking at.

      Problem is complicated when the query applies time series transformations such as moving averages, where requesting only incremental data can be problematic.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection