MongoDB Agent Accessing Container ID Instead of localhost/127.0.0.1 in Status Metrics Collection

I am encountering an issue where the MongoDB agent is trying to access the MongoDB container using the container ID (5c628e85248d:27017) rather than localhost or 127.0.0.1. This is causing a failure during the status metrics collection, as indicated in the agent logs:

Couldn't find pingRound in the MMS response, Err: key=pingRound is not present in the json response
Failure during status metrics collection. 5c628e85248d:27017

It seems like the agent is mistakenly trying to connect to the MongoDB instance via the Docker container ID, which is 5c628e85248d, instead of the usual localhost or 127.0.0.1. Could this be an issue with my Docker setup, or is there a configuration in MongoDB Atlas or the agent that I need to adjust?

Has anyone else encountered this issue, and how can I configure the agent to use localhost or 127.0.0.1 correctly instead of the container ID?

Any help or suggestions would be greatly appreciated!