I am creating a custom python plugin to query MSMQ stats on a windows server, the initial script is working locally but when I package and load the zip to the dynatrace server it responds with Package Not Found.
Is there a dependency so the modules are present on both Dyantrace server and host server.
The Dynatrace server only cares about the plugin.json at the moment. When you did the oneagent_build_plugin command, make sure that it created a folder of the plugin in the plugin_development folder, and do not press the button to upgrade the plugin to production from within the Dynatrace GUI.
Make sure that you build the plugin with the same version as the Dynatrace Plugin Agent (Python 3.6 64-bit unless you have an old OneAgent, then it is Python 3.5 64-bit). Some dependencies compile native libraries during build time, and then you need them to be importable.
If that’s done and it still doesn’t work. Please attach the log file of the plugin (found at programdata/dynatrace/oneagent/log/plugin/ruxitagent_pluginagent_[PID].log).
I have checked and I have python 3.7, not sure if that is going to be an issue but it could be as I was initially running pip 18.0 and had to downgrade to pip 9.3 in order to validate the json schema.
Also I can see that when I execute oneagent_build_plugin the package is zipped and placed into the development directory along with an archive, see below.
======================================== Plugin deployed successfully into C:\Program Files (x86)\dynatrace\oneagent\plugin_development\custom.python.demo_plugin
Plugin archive available at C:\Program Files(x86)\dynatrace\oneagent\plugin_development\custom.python.demo_plugin.zip ======================================== Restarting service Dynatrace OneAgent The Dynatrace OneAgent service is stopping… The Dynatrace OneAgent service was stopped successfully. The Dynatrace OneAgent service was started successfully. oneagent service restarted successfully
I will uninstall python 3.7 and go back to 3.6 to give that another go, if that does fail then I will post the log.
Jason, am looking at similar feature to query/read MSMQ on windows. Maybe you can share scripts so that I don’t have to write something from scratch. Many thanks
Do you have the wmi.py file in the root of your custom.python.demo_plugin directory? Did you add the install_requires into your plugin.json file? Such as this: