Invoking python script from dashboard

How can i invoke a local python script from grafana dashboard ?
Currently i tried invoking the script using ajax from html panel , but it is returning the source code of the script instead of executing it .

Please do let me know the solution .
Thanks !!

Please provide some guidance on how to achieve this ?

Any luck here? Were you able to do this somehow?


I am also looking for it. Pls let me know if were able to make it.


If you’re talking about running Python in the user’s browser, that’s not possible AFAIK.

If you want to run a Python script on the server, you’ll want to set up and expose an HTTP API endpoint that triggers it, which you then call from the Grafana front-end (e.g. via Ajax). For that you might want to use some combination of Flask/uWSGI/Nginx (see e.g. Creating an API to execute a python script - Stack Overflow).

Hi sir,

Thanks for the guide lines. However, I have implemented the solution using python development, flask framework, jinj2, ajax calls and html css. However, the out put shows entire html content when it rendered from python instead only values. Is it possible to show only values instead. Please advise.