cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Run only on Linux or Window server

ewoelkerling
Contributor

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!

3 REPLIES 3

ewoelkerling
Contributor

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!

Mike_L
Dynatrace Guru
Dynatrace Guru

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.

Mike

ewoelkerling
Contributor

Thanks Mike - sorry, only just saw this one - appreciated! 

 

Featured Posts