Can we change default ports of nagios agents?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Can we change default ports of nagios agents?

Post 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.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Can we change default ports of nagios agents?

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Can we change default ports of nagios agents?

Post 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>
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked