07 Mar 2024 10:04 PM - edited 07 Mar 2024 10:07 PM
I'm working on trying to get more familiar with creating a python based extension in the 2.0 framework. I am able to test it locally via the simulate button and see it is working fine but when I upload it to an AG I get the below via grail. I have python 3.11.5 installed on the AG. Anyone ran into this before or know some steps I can take to troubleshoot?
I haven't done anything but touch the ___main__.py_ file and added some code there, haven't touched any other file.
Failed to assign monitoring configuration to ActiveGate. Reason: ERROR: No matching distribution found for my_python
Solved! Go to Solution.
07 Mar 2024 10:11 PM
Hi @sivart_89,
Can you please try building your extension with Python 3.10. The ActiveGates have 3.10 included that EF2 Python extensions use.
(for example in : C:\Program Files\dynatrace\remotepluginmodule\agent\res\dsruntime\python3.10\bin)
This also means that you don't have to install Python separately on the AG(s) you want to run the extensions from.
07 Mar 2024 10:41 PM
That did it 🙂 thank you!
I'm now seeing from grail the below. Is there a file within the extension where I should be putting the required modules? I noticed there is file python.egg-info/requires.txt but that does not seem to actually be saved with changes, seems you need to add it into the setup.py to have the requires.txt file updated. Not even sure if that is the right approach though.
Method=query: ModuleNotFoundError("No module named 'requests'")
07 Mar 2024 10:43 PM
Adding it into the setup file is the way to go.
Download the netscaler or so extension from the public hub to have a look at how we built that extension wheel file.
07 Mar 2024 11:06 PM
Downloaded it, thanks for pointing that out. I'll likely reference it a bit more as I learn more of this.
07 Mar 2024 11:00 PM
As an example to what Mike said, in the setup.py you can add all your required modules in the "install_requires" array.
install_requires=["dt-extensions-sdk", "requests"],
07 Mar 2024 11:07 PM
Thank you @DavidMass. I no longer see that error. Getting other errors now but I know how to fix them. Much appreciated!