Environment in Grafana dashboard

Hello, I have installed grafana in our own environment on a linux machine.
I want to access Prometheus metrics from our testing, staging, and production environment and display all these metrics in a separate dashboard.
Is there any way in grafana to display the dashboard based on environments? Or do I need to make a separate dashboard for each environment and save this dashboard in separate folder ?

Hi @ankushkatiyar,
I am not experienced with Prometheus but I would use different tags on metrics for each environment (e.g environment=test, environment=staging, environment=prod) and then I would create 1 dashboard with environment dashboard variable so that you can choose environment from drop down list.

If, on other hand, you already have 3 Prometheus databases (1 for each environment) then just create dashboard variable with type datasource and you will be able to indirectly select environment through different datasource.

Both approaches implies that all your queries on dashboard use defined dashboard variable.
 

Best regards,
ldrascic