Repl Node name does not necessarily match hostname
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.
Gist with suggested changes at https://gist.github.com/babbottscott/5156737
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.
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.
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)...