Page 1 of 1

Can we change default ports of nagios agents?

Posted: Wed May 14, 2014 8:21 am
by MSPk
Hi Team,

We are designing a monitoring platform for a client who wants to migrate to nagios from the existing monitoring tool. There current design has multiple VLANS being used for each Application environment. Client has already opened certain ports for traffic to flow between the tool and the monitored servers and wants nagios to use the same ports for nagio agents to communicate with Nagios XI instance. Please suggest if we can change the Nagios agents (NSClient++, NRPE) default port numbers, if yes, how.

Re: Can we change default ports of nagios agents?

Posted: Wed May 14, 2014 12:13 pm
by sreinhardt
Yes the ports can be changed, you will need to modify the configurations on each of the agent systems, and modify your commands on the nagios server for the port changes.

Re: Can we change default ports of nagios agents?

Posted: Wed May 14, 2014 6:39 pm
by Box293
On your Windows clients running NSClient++, you would alter the nsc.ini file as follows (for version 3.x)

Code: Select all

[NRPE]
;# NRPE PORT NUMBER
;  This is the port the NRPEListener.dll will listen to.
;port=5666
for example to change it to 5667 you would do:

Code: Select all

[NRPE]
;# NRPE PORT NUMBER
;  This is the port the NRPEListener.dll will listen to.
port=5667
Then from your Nagios host, all of the checks will need to be executed with the -p port parameter:

Code: Select all

check_nrpe -p 5667 -H <host address>