Change the SSH default port on localhost NagiosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
shailu2014
Posts: 102
Joined: Thu Apr 24, 2014 3:17 am

Change the SSH default port on localhost NagiosXI

Post by shailu2014 »

Hi,

I have configured Nagios XI on Centos 6.3, when I opened Nagios XI GUI and checked the localhost giving the CRITICAL alert on SSH.(current port 22)

Can someone help how to change the default SSH port on Nagios XI so that CRITICAL alert change to OK status.(Screen Shot attached)

Thanks & Appreciation in Advance...
You do not have the required permissions to view the files attached to this post.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Change the SSH default port on localhost NagiosXI

Post by eloyd »

The service check "check_ssh" allows for ARG1 to be set to something and passed in to the check. Set ARG1 to "-p PORT" with PORT set to whatever the port is that your ssh server is listening on and you'll be all set.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
shailu2014
Posts: 102
Joined: Thu Apr 24, 2014 3:17 am

Re: Change the SSH default port on localhost NagiosXI

Post by shailu2014 »

I have configured ARG1 to "-p PORT" is not working and still giving the same error.

Can you give me some document to change the SSH default port.

Thanks & Appreciation in Advance...
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Change the SSH default port on localhost NagiosXI

Post by eloyd »

Are you literally using "-p PORT" or are you changing PORT to be the non-standard port number that you're using for your SSH server?

Here's an example of a working configuration in XI, though I have changed the port numbers and machine names for security reasons. Note that ARG1 has been set to the non-standard port of 2222 by using "-p 2222"
ssh.jpg
You do not have the required permissions to view the files attached to this post.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Change the SSH default port on localhost NagiosXI

Post by rkennedy »

Thanks @eloyd! He is right, see the command here -

Code: Select all

[root@localhost libexec]# ./check_ssh -p 2022 127.0.0.1
connect to address 127.0.0.1 and port 2022: Connection refused
If you are still seeing issues after configuring similar to the screenshot above, please post your full service definition.
Former Nagios Employee
shailu2014
Posts: 102
Joined: Thu Apr 24, 2014 3:17 am

Re: Change the SSH default port on localhost NagiosXI

Post by shailu2014 »

after given the non-standard port -p 5566 in $ARG1$, it is working fine now.

Thanks & Appreciation of your help, please now you can close this case.

Thanks Again......... :D :D :D
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Change the SSH default port on localhost NagiosXI

Post by eloyd »

Glad to be of help.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Change the SSH default port on localhost NagiosXI

Post by bwallace »

Glad to hear this is resolved, so closing this one out now - thanks again eloyd
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked