Hello,
I have a personal project where I use Grafana Cloud for monitoring, and MongoDB is running in a Docker Compose setup within a VM. In order for Grafana Cloud to connect to MongoDB, I need to expose port 27017 of MongoDB to the open internet, which raises a security concern as it potentially makes the database vulnerable to attacks.
Additionally, I tried running Grafana locally on the same VM (via Docker) to connect directly to MongoDB, but I found that in the standard version of Grafana, I can’t connect to MongoDB. It seems the only way to achieve this connection is by using Grafana Enterprise.
I would like to know if there is any alternative to:
- Connect Grafana (Open version, via Docker) to MongoDB in my VM without having to expose port 27017 to the open internet.
- Keep MongoDB secure without opening the port directly to the internet.
I’ve explored some options, like configuring the Docker network for internal communication, but I haven’t found a viable solution yet.
Thanks in advance for your help!