nagios-plugin-mongodb icon indicating copy to clipboard operation
nagios-plugin-mongodb copied to clipboard

Repl Node name does not necessarily match hostname

Open babbottscott opened this issue 12 years ago • 4 comments

If the nagios server's DNS uses different domain search than the mongo cluster, the host required by -H may not match the name in the replset. Suggest adding a --name option to specify an alternate node name.

babbottscott avatar Mar 13 '13 21:03 babbottscott

Gist with suggested changes at https://gist.github.com/babbottscott/5156737

babbottscott avatar Mar 13 '13 21:03 babbottscott

Second this request, in fact my rs.status() output has names of "prsh1b.general.company.private:27018". I'll take a look at your suggested delta.

morrisjones avatar May 03 '13 00:05 morrisjones

Also pay attention to compare host with host in replica set case insensitive. DNS names case insensitive so I can have machine name MACHINE1 and host definition in nagios machine1. This plugin fails to find machine1 host in replica set because MACHINE1 exists instead.

jsirex avatar Jun 07 '13 08:06 jsirex

Came across the same issue as well. Specifying the --host <host> works, but would rather use the default 127.0.0.1 to connect (in case the name changes in future)...

gingerlime avatar Jul 17 '13 11:07 gingerlime