04 Nov 2022 05:21 AM - last edited on 15 May 2023 10:59 AM by Michal_Gebacki
Hi All,
I'm trying to build a host-only V1 Python plugin that will be distributed as a package to all servers in an environment (Windows & Linux). Unfortunately, due to module/library setups, etc., configuring themselves for just the OS that things are building on I need to split the package into two - a Linux & a Windows version.
Previously, in order to make host-only packages run I've configured "processTypes": [0], but I can't really do that in this case - unfortunately, both plugin packages will be resident on all hosts so I need Dynatrace to only run the relevant package on the relevant OS type.
I've tried restricting the plugin execution to have technologies: ['LINUX_SYSTEM'] or technologies:['WINDOWS_SYSTEM'] however when I do that the plugin will not run at all on either system.
Any guidance/examples/thoughts that anyone could offer would be hugely appreciated.
Thoughts!?? Thanks!
Solved! Go to Solution.
04 Nov 2022 05:33 AM - last edited on 15 May 2023 11:01 AM by Michal_Gebacki
Sorry - I should add - in case people are wondering. The plugin uses the psutil module in Python - unfortunately when I pip install Psutil it drops in only the libraries relevant for the OS that I'm running on (Linux or Windows) - when I distribute a plugin built this way it will fail on the other operating system (module not found).
Have tried manually picking up the libraries etc for each OS, dropping them into the python site_packages, and then building but to no avail - I suspect there's some more configuration/linking going on during install of Psutil. Hope that helps!
19 May 2023 11:39 AM
Instead of splitting it into two extensions, build it on both Windows and on Linux, and then merge the zip files. That’s how we do our cross OS supported extensions on the hub.
09 Nov 2023 04:34 AM
Thanks Mike - sorry, only just saw this one - appreciated!