Remote Icinga instance 'myWinHost' is not connected to 'Icinga'

windows-agent
(Andre) #1

Icinga2: r2.10.5-1
Icingaweb2: 2.7.0
OS: Ubuntu 18.04.03 LTS

Hi there,
the Windows-Agents on my first test-Clients can’t connect to Icinga2.
I used the director, one time with the Powershell-Module on Windows and other
time manually installed the Icinga2 Agent for Windows.

Plugin-Output

Remote Icinga instance ‘myWinHost’ is not connected to ‘Icinga’

Port 5665 is open on both sites. I have no idea what the problem is.
So I hope someone can help a Icinga2 newcomer

Thx André

(Roland Sommer) #2

Did you sign the agent’s certificate? Any information in the logs?

(Andre) #3

Hi Roland,

how can I sign the agent’s certificate ? I watched a netways-webinar, but it didn’t help me.
Is there a step-by-step howto for Windows monitoring with the Icinga2-Director? I have a old nagios here with the NSCP Client on the windows-machine’s, now I want all monitor with Icinga2

log from windows-Agent:

Fatal: Ausnahme beim Aufrufen von “generateCertificates” mit 0 Argument(en): "information/cli: Retrieving X.509 certificate for ‘ubuntusrv:5665’.
critical/pki: Cannot connect to host ‘ubuntusrv’ on port ‘5665’
"ritical/cli: Failed to fetch certificate from host.
######## The script encountered several errors during run ########
Fatal: Ausnahme beim Aufrufen von “generateCertificates” mit 0 Argument(en): "information/cli: Retrieving X.509 certificate for ‘ubuntusrv:5665’.
critical/pki: Cannot connect to host ‘ubuntusrv’ on port '5665’
"ritical/cli: Failed to fetch certificate from host.

(Roland Sommer) #4

When you manually install and configure the agent, then you need to go to your master and run the commands:

icinga2 ca list

take the according fingerprint and run

icinga2 ca sign (fingerprint)

There several way to use auto signing, details can be found here.

However, you have a communication issue:

Cannot connect to host ‘ubuntusrv’ on port ‘5665’

Can you ping ubuntusrv from your Windows machine? Could the name be resolved:

nslookup ubuntusrv

If not use the ip address instead of ubuntusrv.

(Andre) #5

I try this and I think there is a problem with the timezone.

It is strange, Local time on my Ubuntu is correct but the timestamp of the ca is 2 hours less ?

It seems that the GMT time is used, but why?

timedatectl
Local time: Mi 2019-08-14 15:01:33 CEST
Universal time: Mi 2019-08-14 13:01:33 UTC
RTC time: Mi 2019-08-14 13:01:34
Time zone: Europe/Berlin (CEST, +0200)

Log:
critical/ApiListener: Cannot connect to host ‘192.168.1.166’ on port ‘5665’

but the Port 5665 is open on both sites

(Andre) #6

I have no idea why it doesn’t work with the Icinga2 Agent.
Now I take the NSClient++ and that worked perfect, get all informations
(CPU, MEM, DISK etc.) from the Windows-Host