I created a python script on a Windows host with an Icinga client installed. This script works very well when started locally on the server. This error occurs when it is started via Icinga:
Command “C:\Program Files\ICINGA2/sbin/check_login.py” --hostname xxxxx failed to execute: 193, “%1 ist keine zul?ssige Win32-Anwendung.”
The other checks carried out by the agent such as disk RAM etc. work very well.
Does anyone know the solution to this problem?
What information can I provide so that the problem can be better identified?
When you run that script locally it’s done under the security context of the logged in user e.g. Administrator. When icinga executes the script it’s done under the security context of the icinga agent which is by default “Network Service”.
Director does not help here at all. You could run the icinga agent with administrator’s security context (which is not the best idea from security perspective) or create a wrapper script e.g. with runas option (which challenges you to hide administrator’s password).
Although Icinga told from a permission problem it was a other problem.
With a Python installation path without blank in this style it’ working:
C:\python3\python.exe “C:\Program Files\ICINGA2/sbin/check_login.py”