How to access data from a data source when developing a plugin

I’m developing a metric panel plugin. And I need to access data from elastic data source. What is the function I should use ?


You have to create the elasticsearch data source in Grafana first. Then you select it in your panel under the metric tab.


Hi, can you please tell me how can I identify the change in datasource from my react panel?