Hi,
Can somebody advise what is the logic of CheckCommand merging file path on Windows and Linux with separators per OS?
I have the following CheckCommand definition:
object CheckCommand "check_http_windows-TEST" {
import "plugin-check-command"
command = [ MyCompanyPluginDir, "..\\python3\\python.exe" ]
On Windows Asset service that using this check command is generated as per below:
* command = [ "c:\mycompany\monitoring", "..\python3\python.exe" ]
However, when looking at my debug log and Web2 interface output I’m getting my command like that:
Command c:\mycompany\monitoring ..\python3\python.exe c:\mycompany\monitoring\check_http.py failed to execute: 5, "Access is denied."
As you can see the problem is SPACE between MyCompanyPluginDir (that is set to C:\mycompany\monitoring on Windows). Can somebody tell me where th is space coming from?
Are logic of CheckCommand when specified as list [ ] would not be to use something like python os.sep (so / vs \ for Linux/Windows) to generate command string?
Hope my problem is clear - looking where my space coming from.
Icinga version 2.13.2
Master: Centos 7
Agent: Windows Server 2k19