Hi tanveermadan , You need to ensure that your time range is sufficiently wide enough to include the period when the exporter was still up.
Prometheus knows to scrape your MongoDB exporter (i.e. pmm-admin list shows that the client is running), and will attempt to do so until you explicitly tell it to stop, usually via:
pmm-admin remove mongodb ...
So if the exporter is still running, Prometheus will be able to retrieve some metrics and then save them to the database. This then leads to Grafana having the host available to show statistics (which, if MongoDB was down, would be all zeros / flat lines), and also appear in the Host selector box.
So if the exporter is stopped or the server turned off, Prometheus attempts to scrape but is unable to collect any values at all, and so the timeseries for your MongoDB host simply won’t exist - it doesn’t write blanks to the database, but rather no writes at all for your MongoDB instance are recorded.
This is why you need to ensure that if your exporter is down, your time range should then be inclusive enough to show a period when the server was actually up and running, otherwise Grafana will ask Prometheus “show me all MongoDB instances up during this time range” - so if yours wasn’t running, it won’t be in the list.
I hope this helps!