Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grafana: Simple json data source implementation

Tags:

python

grafana

Has anyone written a json data source for grafana in python? I'm struggling with writing functions and understanding the flow.

I am looking for something like this - https://github.com/bergquist/fake-simple-json-datasource/blob/master/index.js but in python.

like image 517
Mihir Thatte Avatar asked Mar 09 '23 11:03

Mihir Thatte


2 Answers

I've just uploaded a snippet from our python datasource for grafana, it uses pandas + flask and very easy to extend.

https://gist.github.com/linar-jether/95ff412f9d19fdf5e51293eb0c09b850

like image 147
Jether Avatar answered Mar 19 '23 20:03

Jether


To understand the flow, try looking at the generic implementation ... https://grafana.com/plugins/grafana-simple-json-datasource

like image 20
Sumia Avatar answered Mar 19 '23 22:03

Sumia