2

When adding a new host to MMS using and IP address and port, MMS would connect to the replica set, add new hosts for all of the members in the set, but instead of using their IP addresses as listed in rs.status, it would add them by the machine's hostname. It would then remove the host you added. This causes problems if your machines have multiple interfaces, and mongod is not running on the one that the hostname points to. (As is my case.)

Previously, it was that you could go into the Web UI, re-add the appropriate hosts, and then remove the defunct ones. MMS would then happily take this config.

However, lately, the monitoring agent appears to have been re-written in Go. Now, any time I add a host, as soon as it connects, it deletes the host, re-adds it with the bad hostname, and then proceeds to start logging that it can't connect (to the modified hostname that it chose).

Is there any known way to override this behavior?

Stennie
  • 63,885
  • 14
  • 149
  • 175
Thanatos
  • 42,585
  • 14
  • 91
  • 146

1 Answers1

0

You can set a preferred hostname that MMS will use to choose among different ways it could refer to the machine. Go to Settings > Group Settings, and find the Preferred Hostnames section. Add a hostname that's the IP address you want to access it by. Once you save it, MMS will not replace the IP address with the hostname once it connects.

You can use the entire IP address, a prefix of it, or even a regex.

zck
  • 2,712
  • 2
  • 25
  • 44