we need to develop a check_Command to monitor an audio streaming device. This needs to be done using python and the python script needs to be run on a Windows machine.
The machine is a W2019 Server and has an Icinga Agent installed.
Additionally, we installed python for all users and the needed modules with pip.
We created the check_streams.py script and put it in the C:\Program Files\ICINGA2\sbin folder.
we can run the script from the commandline on the machine itself with the expected result
In Icinga Director I created a Plugin Check Command object and set the command to check_streams.py
I created the necessary Service and Service apply rules and rolled out the config…
The check is executed but the Check output is:
Command “C:\Program Files\ICINGA2\/sbin/check_streams.py” failed to execute: 193, “%1 ist keine zul�ssige Win32-Anwendung.”
Even if I run “C:\Program Files\ICINGA2\/sbin/check_streams.py”
Please show us your generated check command. Based on the error, I would guess the CheckCommand.command is exactly the path to the Python script, which is not an Windows binary, but plain text.
Try setting your command to something like /path/to/python3 /path/to/check_streams.py (adjust paths).
Unrelated to the question, but I hope this is a typo. Otherwise, you would run a very outdated agent with multiple critical security vulnerabilities.