I think @simonm’s argument is valid and i would also title this as a agent bakery bug.
If @SergejKipnis can have a look it would also help if this not also happens in 2.0
As the code is complete different in 2.0 agent_bakery.py and i had no time to test, i don’t know if the same problem exists there.
a quick check of the context help within Checkmk states the following:
Note: When using the windows agent, all logical paths point to the same location - the agent installation dir.
I know that this is also not exactly what is happening, because the files are put into “ProgramData” and not into the same directory as check_mk_agent.exe, but let’s just say that the deployment to subdirectories is just not implemented for Windows hosts.
the deployment to subdirectories is just not implemented for Windows hosts
Sorry, I don’t agree in this point. It is possible for the windows agent bakery to deploy files already in /ProgramData/checkmk/agent/config and /ProgramData/checkmk/agent/plugins without any modification.
and not into the same directory as check_mk_agent.exe
In fact, this would be the totally wrong place. It would mix up stock files with user/custom files.
From my understanding, the paths below /ProgramData/checkmk/agent/ are the right place to store custom files (in plugins, config etc.) - and with the small patch above it is possible for /ProgramData/checkmk/agent/bin, too.
of course, ProgramData is the right place. I never doubted that. I am just saying, that the context help in Checkmk in not very precise here. We probably forgot to update it, when we split the files between the directories ProgramData and ProgramFiles (x86).
That does not change the fact, that this feature of deploying custom files to sub-directories on Windows hosts, was ever supposed to work as you expect.
The fact that this seems to work for /config and /plugins would rather be the uninteded behaviour (i.e. bug). The only directories that are supposed to be conisder here are also stated in the context help:
Within a package folder you can create the following subfolders: lib, bin, var, config. These folders are the logical target paths for the files.
‘lib’ is on Windows the folder “C:\programdata\checkmk\agent”
Maybe, but intentional?
This seems more like a bug to me. It looks like the first path element in both cases (bin in my, lib in Christophs case) simply gets stripped. This is why Christoph is getting local and my script is placed in C:\programdata\checkmk\agent.
Yes
From the “quick help” - When using the windows agent all logical paths point to the same location. The agent installation directory (this was 1.5 since 1.6 it is the C:\programdata.…)
=> On Windows, the upper “lib” folder is needed to place the files correctly in subfolders bin,config,lib and var of C:\programdata\checkmk\agent. Then everything seems to work as expected.
Hi Sergej,
thanks for your message.
We have discussed this, and as we found out that this additional “lib” folder obviously produces the expected results on Windows, we don’t need any change/fix.
Thanks & regards,
Simon
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.