Page 1 of 1
Sorry for dumb question. NRPE vs check_nt
Posted: Wed Apr 08, 2020 12:41 pm
by bbdabb
So it looks like Nagios uses check_nt 12489 for windows machines and NRPE 5666 for Linux. I'm just getting into this so I imagine there's way more to it, but I don't think it applies to my question.
I just fought to get 12489 opened and was wondering if I could have NRPE use 12489 on the Linux agents. Again NRPE for Linux and check_nt for windows
Re: Sorry for dumb question. NRPE vs check_nt
Posted: Thu Apr 09, 2020 10:14 am
by jbrunkow
That's totally not a dumb question!
We also have a cross platform agent called
NCPA that can run on Windows, Mac, or Linux.
Yes, you can change the port for NRPE. You will probably have to change the ports specified in the
/etc/xinet.d/nrpe ,
/etc/services ,
/usr/local/nagios/etc/nrpe.cfg files on your host machine.
Then, on your
Nagios XI server, you will need to change the port of that check with the
-p flag in the command.
Does that help? Please let me know if I can provide further clarification.
Re: Sorry for dumb question. NRPE vs check_nt
Posted: Wed Apr 15, 2020 10:04 am
by bbdabb
That's great news. Is there a way on Nagios XI to have NRPE checks default to 12489? Again I am talking server side. I know on the client side I will need to update what port I want it to listen on.
I'm still a little confused about when I'm adding a host where I would add the -p 12489. I know I will need to add it to the ARG on all the checks on the one host we have already added.
Re: Sorry for dumb question. NRPE vs check_nt
Posted: Wed Apr 15, 2020 1:29 pm
by lmiltchev
The "default" port for check_nrpe is 5666. You can view the plugin's usage by running the following command from the command line:
/usr/local/nagios/libexec/check_nrpe -h
This is the port section:
-p, --port=PORT The port on which the daemon is running (default=5666)
So, if you don't change your "default" check_nrpe command from this:
Code: Select all
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
to this:
Code: Select all
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -p 12489 -c $ARG1$ $ARG2$
}
the "default" port will be used.
You can change your command in Nagios XI by going to the
CCM > Commands > check_nrpe > Edit.
Add the port, save, and apply configuration. Let us know if you have any further questions.