Check command 'Invoke-IcingaCheckxxxx' does not exist

Hi community,
I tried monitoring Windows system with Windows Agent 2.11.3 and the Powershell Commands but I always receive “Check command ‘Invoke-IcingaCheckCPU’ does not exist.” or “Check command ‘Invoke-IcingaCheckUsedPartitionSpace’ does not exist.”.
But if I for example check with ITL Command “disk-windows” this check is working fine.
Locally on the Windows client the commands are available and can be executed manually.
I checked zones, other configs etc. but it all looks good to me…
I use a fresh Install of Icinga2 (r2.11.3-1), Icingaweb2 (2.7.3) and director (1.7.2)
Any help would be appreciated,
Thanks,
HHA

Hello and welcome,

did you copy the check plugin to your agent? Also does the agent now about the check command? You can easily test it on the agent by invoking

icinga2 object list --type checkcommand --name Invoke-IcingaCheckCPU

Regards,
Carsten

Hello Carsten,

thank you for your reply!
this seems to be my problem, this command doesn’t return anything on the agent!
I thought installing the agent, the framework and the plugins on the Windows host, exporting and importing the commands to the icinga (director) server would be sufficient.
Starting the Invoke-IcingaCheckCPU manually on the Windows host gives me the result of the CPU-usage, so the Check plugin should be available.
Could you please give me a hint, how to make the agent know about the check?

Best regards,
HHA

Hi,

The plugin is one of the new powershell plugins from icinga for windows? If yes did you ot the script created the commands / commands baskets are imported into director?

Regards,
Carsten

Hi Carsten,
yes, I did a “Get-IcingaCheckCommandConfig -OutDirectory …” and imported the basket in director…
Best regards,
HHA

We have the exact same problem, the Test-IcingaAgent says everything is fine however icinga itself cannot locate the powershell plugins.

The Agents have the global-director zone? Check it on the agents with

icinga2 object list --type zone

And check if it is a global zone. Also check if the Director realy knows this command.

Regards,
Carsten

Hi Carsten,

yes, the agent has the global zone and the director knows the command.

After searching the logs on the windows agent (especially “C:\ProgramData\icinga2\var\lib\icinga2\api\zones-stage\startup.log”) I finally could find the root source of the problem:
I created a new constant (PluginCustomDir) in constant.conf as suggested in the example of the Check_Fritz monitoring (https://github.com/mcktr/check_fritz) but this constant is not replicated to the agent!
Therefore I got an config-error on the agent when restarting the agent and my director global zone couldn’t be replicated to the agent.
After adding this constant locally in “C:\ProgramData\icinga2\etc\icinga2\constants.conf” and restarting the agent the zone got synched and all started working!
Is it best practice to create such custom constants in director or would it be better to install the check_fritz plugin to the “normal” plugin folder?

Many thanks for your support,
best regards,
HHA