Use plugin datasource grafana


I just create plugin type datasource in this img below how can i change user then post filter by userId

Hi @thanhthu2 I am not entirely sure I understand your question. What you are showing in the image is a panel (not a data source)

If you want to learn how to build a data source I advice you to first follow our tutorial Build a data source plugin | Grafana Plugin Tools so you can familiarize with all the concepts.

https://share.vidyard.com/watch/AxT1vQ4yFPCMh4vSqafq1M? Hi
I want my plugin datasource like video below,when i change “namespace” then “pod” filter by namespace and using variable “$namespace”

Hi @thanhthu2 I still don’t understand well what you want, but it seems to be you are perhaps confusing dashboard variables and data sources.

dashboard variables (the ones in the dropdown at the top of the dashboard) are defined at dashboard level (by the user) and not by data sources, though, there are “query variables” which are variables populated by doing a query to a data source. These variables can even depend on other variables being selected (like in your video).

In query variables the data source is merely providing the possible values (via a query the dashboard does) and NOT directly anywhere in the data source code saying something such as “put these variable values on the dashboard”. That’s all set up by the user.

You also might want to make sure your data source supports variables. you can see our documentation about it