There is only one correct way: "getent services nrpe". This is the only command which returns an always correct value (at least if no error occours). All the assumptions about where the services are defined will never work if you don't honor the services configuration in /etc/nsswitch.conf.