I am using two data sources: Prometheus and Postgres.
The common field from both data sources is an instance IP.
Generally, we install node exporter in every instance, and using Prometheus we will pull metrics. We also store some other details of servers
in the Postgres data sources.
Few servers we didn't install node exporter(we didn't install it because those are not reachable) but we stored those servers' data in Postgres.
I want to add a filter in the Grafana dashboard such that there should be three options: All, Reachable, and Unreachable.
- If I click All, every instance that is there in the database should appear.
- If I click Reachable, only reachable servers should appear.
- If I click Unreachable, only unreachable servers should appear.
But I can get Reachable and Unreachable servers/instances using metrics "UP" from Prometheus Query Language.
But If I click the ALL option I am not getting all servers, because on some servers where I didn't install node exporter those servers I am not able to populate the table.
Do I need to do anything while using two Data Sources? Any transformations I need to do in Grafana so that it can be achievable?
Thanks in advance
Thanks & regards, Bharath Kumar.