From 4841525379f1e753ec48e8c8c1eb12d7c7101c8e Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 4 Apr 2019 15:29:45 +0200 Subject: [PATCH] Troubleshooting docs: Add Windows agents without NodeName constant --- doc/15-troubleshooting.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/15-troubleshooting.md b/doc/15-troubleshooting.md index 7c62d3bb4..dcbffd389 100644 --- a/doc/15-troubleshooting.md +++ b/doc/15-troubleshooting.md @@ -1067,6 +1067,33 @@ Check the following: ### Cluster Troubleshooting: Windows Agents +#### Windows Agents consuming 100% CPU + +Icinga 2 requires the `NodeName` [constant](17-language-reference.md#constants) in various places to run. +This includes loading the TLS certificates, setting the proper check source, +and so on. + +Typically the Windows setup wizard and also the CLI commands populate the [constants.conf](04-configuring-icinga-2.md#constants-conf) +file with the auto-detected or user-provided FQDN/Common Name. + +If this constant is not set during startup, Icinga will try to resolve the +FQDN, if that fails, fetch the hostname. If everything fails, it logs +an error and sets this to `localhost`. This results in undefined behaviour +if ignored by the admin. + +Querying the DNS when not reachable is CPU consuming, and may look like Icinga +is doing lots of checks, etc. but actually really is just starting up. + +In order to fix this, edit the `constants.conf` file and populate +the `NodeName` constant with the FQDN. Ensure this is the same value +as the local endpoint object name. + +``` +const NodeName = "windows-client1.domain.com" +``` + + + #### Windows blocking Icinga 2 with ephemeral port range When you see a message like this in your Windows agent logs: -- 2.40.0