Icinga2 Master use Port 12489 instead 5665

Hi Community,
I am not realy a newbie but Windows is not my real work.
My Icinga master is a Debian Server and I also Monitor some Windows Sever with the nsclient++.
Now I have setup my first Windows Server with an Icinga 2 Client configured, but this looks strange.
My Icinga Master try to connect to Windows Client via Port 12489 instead of 5665.
What`s wrong here? Why use my Master Server Port 12489? It is nowhere configured on the Master.

Would be great if someone give my a hint what wrong here!

Hi @joltmann

12489 is the default port for check_nt, isn’t it?
How did you configure the checks for the windows server?

Kind regards

Hi ritzgu,
maybe that`s the problem. For my other Windows Server with the nsclient++ I use the nscp check command
For example

apply Service “load” {
import “generic-service”
check_command = “nscp”
vars.nscp_variable = “CPULOAD”
vars.nscp_params = “10,90,95,30,90,95”
assign where host.vars.os == “windows”

Do you run a distributed setup (windows server configured as icinga2 agent with host/zones configuration) or do you ‘actively’ check the windows server via the master?

I configured the Windows Server with the Icinga2 Client Wizard, icinga2 agent with host/zones.
But anyway the Master try to connet to Port 12489 to the Windows Server

The master is probably still trying to check the new windows host via nscp then. Anyway: If the zones are set up correctly, you can use the new icinga2 agent as a command endpoint for checks:

Hii @joltmann,

You probably set in master’s zones.conf the host attribute for the Windows server but not the port attr too and therefore the master is trying to reach the server with random free port. You also could try to set the port attribute to the correct value in master’s zones.conf within object Endpoint "Windows Server hostname" ....


Hi Yonas,
I set no port attr on all hosts, except for the Win Server with Icinga2 client.
But Icinga master should ignore it :slight_smile:

object Endpoint “winserver_icinga2” {
host = “winserver_icinga2”
port = “5665”

Hello @joltmann,
In your original post you said ‘I also Monitor some Windows Sever with the nsclient++’. Could this traffic you see be from your old monitoring setup?

Can you turn on the debug logs on the Windows Server? Do this provide any good information?


Hi Alex,
maybe be the setup from the nsclient++ is the Problem, but how can I separate it or it is not possible to monitor Windows Server with icinga2 and nsclient++ together on the same Icinga Master?
I am not a Windows “Guru” so I don’t know how to enable the debug logs on Windows :frowning:

It is no surprise that icinga still tries to connect with the “wrong” port since your service definition is still defined like it was before.

For using Icinga agent you need to change the check_command e.g. load and add this line to a new service definition

command_endpoint = host.name

And you need to rearrange your assign rules so that they are only valid for their appropriate hosts.

1 Like

Hi Roland,
that’s my problem. I used before the nscp command!
But when I use it on the “new” Windows Icinga2 Server my Icinga Master try to connect to Port 12489.
On the “old” Windows Server with nsclient++ everything runs well

As Roland already pointed out, you are still using “nscp” for the checks. Nscp/check_nt uses port 12489 to connect to your agent.

  vars.nscp_port = 12489
  • If you still want to use the “old” way and use nscp/check_nt/NSClient: After installing the icinga2 agent on the windows server, did you configure NSClient?

  • If you want to use the icinga agent:

yeah know I understand. I had two Problems.

  1. I used he wrong check.
  2. The Certificate was not realy signed.

Now it looks good.
Thanks for help and my “misunderstanding”