seanlaff / simple-streaming-datasource
- среда, 6 марта 2019 г. в 00:17:58
JavaScript
End-to-end Grafana streaming datasource example
Inspired by the live-streaming talk at Grafanacon 2019, this is a living example of streaming within a datasource including a reference server that streams random data.
This example relies on unfinalized behavior within Grafana, and may break
This example fixes some of the shortcomings mentioned in the talk.
Streaming data is a great way to reduce pressure on your metric backend/network. Rather than using a 5s dashboard refresh (which requests duplicate points over and over again), stream new data as its avaiable!
Install as you would any grafana datasource. Then, run go run server.go
. This will spawn a server at http://localhost:8080
that this datasource reads data from. Also included is a demo dashboard.
By default, the server will stream data at 50ms and the datasource plugin will throttle repaints to 100ms.