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

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
Achillefs
Posts: 6
Joined: Thu Jan 21, 2021 12:42 pm

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

Post 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!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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.
Achillefs
Posts: 6
Joined: Thu Jan 21, 2021 12:42 pm

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

Post 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!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

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

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

Be sure to check out our Knowledgebase for helpful articles and solutions!