Page 1 of 1

Nagios XI Deploy Agent(NCPA) on Unix with different SSH Port

Posted: Fri May 21, 2021 3:23 am
by Achillefs
Hello all,

Sorry if this topic has already been answered before but from my search I could not find anything related to it.
Basically, we have a Nagios XI setup in which we monitor a lot of Linux hosts using NRPE and we are thinking of switching to NCPA due to it being officially supported by Nagios themselves, and providing some things by default(monitor Services for example).
We have already tried the manual deployment of an agent it works like a charm.
What we would like to try now is the functionality of deploying a Nagios Agent through Nagios XI.
However, we noticed that it needs SSH access(which we can allow temporarily) but it tries only the default port.
So far I was not able to find a way to change the port the deployment task is using.
Can I somehow change that? I don't care if it gets changed for every server, I am fine with that.
Alternatively, is there any other way to achieve this? Deploying agents through Nagios XI itself seems like it will speed up the whole process by a lot.

Thank you very much!

Re: Nagios XI Deploy Agent(NCPA) on Unix with different SSH

Posted: Fri May 21, 2021 2:53 pm
by ssax
You can edit this file:

Code: Select all

/usr/local/nagiosxi/html/config/deployment/templates/ansible.cfg
Change this:

Code: Select all

ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null
To this:
- Change XX to the SSH port number you want to use

Code: Select all

ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null -p XX
Please note that this change will be reverted on an upgrade so if you upgrade you'll need to re-implement it.

I have submit a request to development requesting they add custom ports as an option:

FR: XI - NCPA Deploy Agent - Allow Custom SSH ports

Please keep in mind that the decision to implement the enhancement is at the discretion of our development team.

Re: Nagios XI Deploy Agent(NCPA) on Unix with different SSH

Posted: Tue May 25, 2021 3:04 am
by Achillefs
ssax wrote:You can edit this file:

Code: Select all

/usr/local/nagiosxi/html/config/deployment/templates/ansible.cfg
Change this:

Code: Select all

ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null
To this:
- Change XX to the SSH port number you want to use

Code: Select all

ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null -p XX
Please note that this change will be reverted on an upgrade so if you upgrade you'll need to re-implement it.

I have submit a request to development requesting they add custom ports as an option:

FR: XI - NCPA Deploy Agent - Allow Custom SSH ports

Please keep in mind that the decision to implement the enhancement is at the discretion of our development team.
Hello,

Sorry for my late reply. Just wanted to say thank you very much and confirm that indeed it worked like a charm!

Re: Nagios XI Deploy Agent(NCPA) on Unix with different SSH

Posted: Tue May 25, 2021 11:02 am
by benjaminsmith
Hi,
Sorry for my late reply. Just wanted to say thank you very much and confirm that indeed it worked like a charm!
Excellent! We'll go ahead and close this out.

Thank you for using Nagios!