I am creating an app plugin that creates out of the box monitoring page leveraging Prometheus metrics. This app plugin has both frontend and backend components.
Is it possible for my backend plugin to communicate with Prometheus datasource that is already configured in Grafana?
You can call the query method of configured datasources from an app plugin and pass a query but you need to know the datasource uuid.
For this you can use the DatasourcePicker component from @grafana/runtime
to let the user select a datasource.
notice there’s no way to “push” data. you will only be able to query.