Open box293 opened 7 years ago
Good idea. Should it not also happen with the server install?
The remote machine running the NRPE client is where it is needed from what I understand.
I assume when you say "server" you mean the Nagios server, I'm not sure if check_nrpe
has any specific requirements or uses the services file.
Surely this would also be required on the server which would communicate with monitored clients on the same port? Unless i am completely mistaken?
Happy to be corrected, of course.
After your input I wanted to investigate some more, I had come across issues in the past when I had experienced build problems when the entry did not exist in /etc/services
, so I wanted to thoroughly understand why.
A quick search of the code indicates that Makefile.in
does a check for it at line 169. This appears to be part of the install-inetd
function.
I assume then that the entry in /etc/services
is only required for the build process to complete (without failure) when performing a make install-inetd
.
I'm unsure though if the actual NRPE code requires the entry in /etc/services
.
It does not. /etc/services is like a DNS for service-to-port number mappings. So if you issued a command like:
tcpdump port ssh
It would look it up to find port 22. Almost nothing needs entries in the file to actually run.
Fair enough.
On Tue, Jul 18, 2017, 4:40 PM Eric Loyd notifications@github.com wrote:
It does not. /etc/services is like a DNS for service-to-port number mappings. So if you issued a command like:
tcpdump port ssh
It would look it up to find port 22. Almost nothing needs entries in the file to actually run.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/NagiosEnterprises/nrpe/issues/151#issuecomment-316031882, or mute the thread https://github.com/notifications/unsubscribe-auth/AABbBOSeYq-PtxCboL291Ex3f313HgKiks5sPJJQgaJpZM4OZes6 .
--
-- Mayuresh
I should have said "it should not." I haven't actually looked at the code, but the NRPE daemon itself should have no reason to try to translate "nrpe" to "5666" unless it's trying to communicate with itself using the service name "nrpe." Which I doubt, since the port number is right there in the configuration file if it wants to use it.
I wanted to clarify that an entry in /etc/services
is required for xinetd to correctly function. If this entry does not exist then then xinetd does not provide nrpe as a functioning open port. I was testing NRPE on a custom tcp port using xinetd and I went down a troubleshooting rabbithole to discover this.
Oh. Did I mention we got IANA approved - this is our service officially now?
In the install documentation: https://support.nagios.com/kb/article.php?id=515
You need to populate the
services
file, for example:It would be nice if there was a script that detected if this is required and add it.