Take the 2-minute tour ×

I'm trying to get 10gen's MongoDB Monitoring Service monitoring my 3-node replica set. The replica set running in an AWS VPC. Each node runs on a different [virtual] machine. Assume their IPs are (primary or secondary), (primary or secondary), (arbiter).

From a quick look at the source, MMS appears to get the hostname of the machine it is running on like so:


For my VPC EC2 instance, this returns something like


MMS then tries to connect to this hostname, which does not resolve. I'd rather just use IP addresses (since they're always static), but it seems like the hardcoded use of platform.uname()[1] in mmsAgent.py precludes that.

So, what's an elegant way out of this? Hack /etc/hosts? I'm not setting up a DNS server just for this. Maybe I'm just misunderstanding how to configure MMS.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

That piece in the agent is actually what the agent reports its name as, not what it is connecting to. In terms of what it does connect to, once you run it:

  • mms.10gen.com (port 443 - SSL) - it connects here to upload data and to read its config
  • every host you configure from your MMS page (the + button)
  • any auto-discovered hosts (if you add a mongos for example)

It will connect to the hosts based on the hostname you input into MMS when you cick the add button, or it will use the host names it auto-discovers.

Note: you can add IP addresses to the MMS config instead of hostnames and the agent will pick that up just fine, you can then add aliases to improve readability on the site after the fact

Because I work for 10gen, I can take a look at your MMS group if you send me the group name separately if you like. If not then I suggest taking a look at the Agent Log tab - that will list the errors the agent has seen, assuming it can connect to mms.10gen.com at all.

share|improve this answer
Thank you, I was able to get it working with the knowledge that I just needed to add hosts manually via the Web UI. –  Adam Monsen Jun 20 '12 at 16:33
add comment

I always set a hosts entry like this: host.domain.com host

Precisely for this. As far as I know, there is no other way the FQDN can be obtained on the host itself.

share|improve this answer
add comment

Your Answer


