Connection to localhost refused

Hi there:

I am in the process of completing my first Icinga2 server which has gone well barring one small wrinkle. I am getting an error stating the following:

connect to address 127.0.0.1 and port 22: Connection refused

So I understand that I have set a custom SSH port on the server platform (Ubuntu 18.04) that I have installed in on which is pretty standard. So I understand the error and have been trying to find out where to change the default port. I am not 100% sure so I thought that I would ask if someone could help.

That would be great :slight_smile:

Thanks so much and I apologies if this is posted to the wrong topic.
-Michael

Hi there:

I am in the process of completing my first Icinga2 server which has gone well
barring one small wrinkle. I am getting an error stating the following:

connect to address 127.0.0.1 and port 22: Connection refused

So I understand that I have set a custom SSH port on the server platform
(Ubuntu 18.04) that I have installed in on which is pretty standard. So I
understand the error and have been trying to find out where to change the
default port.

Define ssh_port in your service check.

https://icinga.com/docs/icinga2/latest/doc/10-icinga-template-library/#ssh

Antony.

3 Likes

Hi Antony:

Thanks so much… I adjusted the services.conf file as follows:

check_command = “ssh”
vars.ssh_port = xxxx

I decided that would be okay because the port I use is fairly universal… :smiley:

Thanks for pushing me in the right direction… I appreciate it.
-Michael

1 Like

Hi,

keep in mind that a local SSH check doesn’t prove much though :wink: It is just an example to show you some basic checks and how they can be done. For more services and their monitoring, you’ll truly learn more after the basics in the “service monitoring” chapter :slight_smile:

Cheers,
Michael

1 Like