Grafana dashboard for MongoDB Atlas using Prometheus HTTPS (as Data source)


I have integrated Prometheus with MongoDB Atlas to collect alert metrics.

The prometheus URL is in HTTPS with format “https://:<mongoDB port#>/metrics”. Im able to call the URL and prometheus is returning output in standard format like below,

HELP hardware_disk_metrics_disk_space_free_bytes The disk space free in the mounted file system.

TYPE hardware_disk_metrics_disk_space_free_bytes gauge

hardware_disk_metrics_disk_space_free_bytes{disk_name=“data”} 1.837049856e+10

I can see all the metrics returned by prometheus, if I call the HTTS URL directly.

I was trying to add the above URL as Prometheus Datasource in the “URL” field. Also entered the basic Auth user/pwd details.

Got following error:

“Error reading Prometheus: client_error: client error: 404”

How to configure Grafana dashboard using Prometheus “HTTPS” URL? I was testing in local Mac laptop. I also AWS account and can use Grafana managed service.

Please let me know how to monitor MongoDB atlas from Grafana.