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...
Change the SSH default port on localhost NagiosXI
-
shailu2014
- Posts: 102
- Joined: Thu Apr 24, 2014 3:17 am
Change the SSH default port on localhost NagiosXI
You do not have the required permissions to view the files attached to this post.
Re: Change the SSH default port on localhost NagiosXI
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.
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
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...
Can you give me some document to change the SSH default port.
Thanks & Appreciation in Advance...
Re: Change the SSH default port on localhost NagiosXI
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"
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"
You do not have the required permissions to view the files attached to this post.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Change the SSH default port on localhost NagiosXI
Thanks @eloyd! He is right, see the command here -
If you are still seeing issues after configuring similar to the screenshot above, please post your full service definition.
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
Former Nagios Employee
-
shailu2014
- Posts: 102
- Joined: Thu Apr 24, 2014 3:17 am
Re: Change the SSH default port on localhost NagiosXI
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.........

Thanks & Appreciation of your help, please now you can close this case.
Thanks Again.........
Re: Change the SSH default port on localhost NagiosXI
Glad to be of help.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Change the SSH default port on localhost NagiosXI
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!