Check_load.exe is returning error: "Parameter is incorrect"

Hello, all!

I have problem with Icinga for Windows agent (newest version: v2.14.2). Normally when I run:
C:\Program Files\ICINGA2\sbin>check_load.exe
I would see output, something like this:
**LOAD OK 18.6308% | 'load'=18.6308%;;;0;100**

But on one computer (Windows 10 Enterprise, 22H2) when I run check_load.exe I am getting an error The parameter is incorrect
but when I try something else, for example check_memory, everything is working correct.

I also tried: C:\Program Files\ICINGA2\sbin>check_load.exe --debug
But only output is this

Creating query and adding counter
Parametr nen sprvn

Parametr nen sprvn = The parameter is inccorect (in Czech language)

I also tried icinga2 daemon -C on Windows agent - everything looks fine:

[2024-10-14 14:41:56 +0200] information/cli: Icinga application loader (version: v2.14.2)
[2024-10-14 14:41:56 +0200] information/cli: Loading configuration file(s).
[2024-10-14 14:41:56 +0200] information/ConfigItem: Committing config item(s).
[2024-10-14 14:41:56 +0200] information/ApiListener: My API identity: BYDLC04N.cw01.contiwan.com
[2024-10-14 14:41:56 +0200] information/ConfigItem: Instantiated 1 IcingaApplication.
[2024-10-14 14:41:56 +0200] information/ConfigItem: Instantiated 4 Zones.
[2024-10-14 14:41:56 +0200] information/ConfigItem: Instantiated 1 CheckerComponent.
[2024-10-14 14:41:56 +0200] information/ConfigItem: Instantiated 2 Endpoints.
[2024-10-14 14:41:56 +0200] information/ConfigItem: Instantiated 1 ApiListener.
[2024-10-14 14:41:56 +0200] information/ConfigItem: Instantiated 1 WindowsEventLogLogger.
[2024-10-14 14:41:56 +0200] information/ConfigItem: Instantiated 246 CheckCommands.
[2024-10-14 14:41:56 +0200] information/ScriptGlobal: Dumping variables to file 'C:\ProgramData\icinga2\var\cache\icinga2/icinga2.vars'
[2024-10-14 14:41:56 +0200] information/cli: Finished validating the configuration file(s).

icinga2 --version

icinga2 - The Icinga 2 network monitoring daemon (version: v2.14.2)

Copyright (c) 2012-2024 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

System information:
  Platform: Windows
  Platform version: 8
  Kernel: Windows
  Kernel version: 6.2
  Architecture: x86_64

Build information:
  Compiler: MSVC 19.29.30153.0
  Build host: WINBUILD2
  OpenSSL version: OpenSSL 3.0.12 24 Oct 2023

Application information:

General paths:
  Config directory: C:\ProgramData\icinga2\etc\icinga2
  Data directory: C:\ProgramData\icinga2\var\lib\icinga2
  Log directory: C:\ProgramData\icinga2\var\log\icinga2
  Cache directory: C:\ProgramData\icinga2\var\cache\icinga2
  Spool directory: C:\ProgramData\icinga2\var\spool\icinga2
  Run directory: C:\ProgramData\icinga2\var\run\icinga2

Old paths (deprecated):
  Installation root: C:\Program Files\ICINGA2\
  Sysconf directory: C:\ProgramData\icinga2\etc
  Run directory (base): C:\ProgramData\icinga2\var\run
  Local state directory: C:\ProgramData\icinga2\var

Internal paths:
  Package data directory: C:\Program Files\ICINGA2\\share\icinga2
  State path: C:\ProgramData\icinga2\var\lib\icinga2/icinga2.state
  Modified attributes path: C:\ProgramData\icinga2\var\lib\icinga2/modified-attributes.conf
  Objects path: C:\ProgramData\icinga2\var\cache\icinga2/icinga2.debug
  Vars path: C:\ProgramData\icinga2\var\cache\icinga2/icinga2.vars
  PID path: C:\ProgramData\icinga2\var\run\icinga2/icinga2.pid

It’s a newly installed agent, I also tried to uninstall Icinga2 agent and install it back and I have still the same issue. With other services (disk_check, memory_check,…) on same computer we have no problem).

Thank you very much for any help.

I would consider the checks like check_load as legacy - have you tried using icinga for windows/the icinga powershell framework?

Hello, thank you for your answer. The problem is, that I need to install it on machines, which doesn’t have access to the public internet, so I cannot add Icinga-Repository and download all these stuff. I also cannot use Invoke-Commands because it’s blocked by group policy. I also don’t need to monitor something specific, just HDD, CPU/RAM, etc.

Almost 50 PCs are working fine, but this one specific has problems and I cannot find out why.

i had the same problem. creating query and adding counter is the problem, so you have to rebuild it.

here that solution

https://answers.microsoft.com/en-us/windows/forum/all/perfmon-problems-unable-to-add-counters/e90f231d-0014-457d-8b1f-5f342971597a

just try: lodctr /r

is worked by me. :slight_smile:

3 Likes