• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
        • Enterprise Synthetic Monitoring
      • Synthetic Classic
        • Synthetic Classic Open Q&A
      • BSM Open Q&A
  • Home /
  • Public Forums /
  • Dynatrace /
  • Dynatrace Open Q&A /
avatar image
Question by Rick B. · Feb 01 at 07:16 PM · plugins activegate

activegate plugin python dependency

Hi!

I've listed my plugin's dependencies in the `install_requires' element of 'source' in my ActiveGate remote plugin plugin.json, but it doesn't seem like the plugin module is installing it. Is there potentially a step I missed, or missing functionality due to this being beta? Where can i check logs for this?


Thanks,

Rick B

Comment

People who like this

0 Show 3
10 |2000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Rick B. · Feb 01 at 07:20 PM 0
Share

2019-02-01 18:46:00.992 UTC [1e7738ef] info    [native] 140664985044736(MainThread) - [report_status] new plugin status for engine ('custom.remote.python.kafka.Stats', 0) PluginFullStatus(pluginName=custom.remote.python.kafka.Stats, pluginVersion=0.003, state=ERROR_UNKNOWN, description=No module named 'avro', monitoredEntityId=0x0, stacktrace=Traceback (most recent call last):
   File "/var/opt/dynatrace/gateway/remotepluginmodule/agent/plugin/engine/ruxit/plugin_state_machine.py", line 270, in _execute_next_task
     self._engine.send(None)
   File "/var/opt/dynatrace/gateway/remotepluginmodule/agent/plugin/engine/ruxit/plugin_state_machine.py", line 525, in engine_generator
     plugin_module = importlib.import_module(plugin_engine_instance.metadata["source"]["package"])
   File "/var/opt/dynatrace/gateway/remotepluginmodule/agent/plugin/python3.6/importlib/__init__.py", line 126, in import_module
     return _bootstrap._gcd_import(name[level:], package, level)
   File "", line 994, in _gcd_import
   File "", line 971, in _find_and_load
   File "", line 955, in _find_and_load_unlocked
   File "", line 665, in _load_unlocked
   File "", line 678, in exec_module
   File "", line 219, in _call_with_frames_removed
   File "/var/opt/dynatrace/gateway/remotepluginmodule/plugin_deployment/kafka-pipeline-plugin/kafka-pipeline-plugin.py", line 5, in 
     from avro.io import BinaryDecoder, DatumReader
 ModuleNotFoundError: No module named 'avro'

with plugin.json starting:

{
   "name": "custom.remote.python.kafka.Stats",
   "version": "0.003",
   "type": "python",
   "entity": "CUSTOM_DEVICE",
   "processTypeNames": ["PYTHON"],
   "technologies": ["Kafka Custom Pipeline"],
   "favicon": "https://www.ibm.com/watson/health/favicon.ico",
   "source": {
      "package": "kafka-pipeline-plugin",
      "className": "KafkaPipelinePlugin",
      "install_requires": ["avro","timeit","kafka"],
      "activation": "Remote"
   },
...
avatar image Michael L. Rick B. · Feb 02 at 12:53 PM 0
Share

Can you also add the output of oneagent_build_plugin?

avatar image Rick B. Michael L. · Feb 04 at 01:32 PM 0
Share

hi, please see the comments on Piotr's answer

2 Replies

· Add your reply
  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image
Best Answer

Answer by Piotr M. · Feb 04 at 08:26 AM

Hi Rick,

have you built your plugin using

oneagent_build_plugin

command from Plugin SDK? That should build your plugin with required packages inside.

See Deploy via Plugin SDK:

https://www.dynatrace.com/support/help/extend-dyna...

Peter

Comment

People who like this

0 Show 6 · Share
10 |2000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Rick B. · Feb 04 at 01:00 PM 0
Share

thanks Piotr,
I thought that was only for oneagent plugins, some of the documentation is a little confusing.

avatar image Rick B. Rick B. · Feb 04 at 01:31 PM 0
Share

Hi Piotr,

I previously followed the "manual" version of the deploy instructions there, before posting this question. now i'm trying to follow the sdk version and cannot find where or how to invoke the oneagent_build_plugin call, as it doesn't seem to be on my path as a user on the linux box where my activegate and plugin module were installed, nor does it seem to be the name of any of the files in my install path. do you have direct knowledge of deploying plugins to linux activegates, and where i might be going wrong?

Thanks,

Rick B

avatar image David L. Rick B. · Feb 04 at 05:16 PM 0
Share

Hello Rick,

When you install the Plugin SDK, the install script will put these scripts inside the python /bin directory, side by side with pip, easy_install, etc.

Of course, if you do not have that directory as part of your path you will not "see" the commands. I recommend you use Python Virtual Environments (https://docs.python.org/3/library/venv.html) when developing plugins, because this will sort it our for you with no need to change your PATH environment variable or call the scripts manually from the location

avatar image Rick B. David L. · Feb 04 at 09:49 PM 0
Share

thanks, i used virtualenv locally for dev and didn't think to see that on the command line there. i'm not able to get venv set up on the activegate server so i'll need to try to figure out where the packaged python environment is and work from there on the server. kind of annoying and not really spelled out in the directions where certain things are done, not to mention the manual method written out in the docs doesn't work when you have required extra modules

avatar image Piotr M. Rick B. · Feb 05 at 10:03 AM 0
Share

Rick,

you don't need to install venv on ActiveGate server, it's enough to have it on your dev machine. Please install Plugin SDK inside you venv and use oneagent_build_plugin script to build the plugin. It will create a plugin package, which has to be uploaded to the server - the same script can do that if you provide server address and token. Finally you have to take this built plugin and story it in plugin_deployment dir on ActiveGate machine.

https://www.dynatrace.com/support/help/extend-dynatrace/activegate-plugins/plugin-development/activegate-plugin-sdk-overview/

Peter

avatar image Rick B. Piotr M. · Feb 05 at 03:38 PM 0
Share

thank you. running into other issues now but this has resolved my dependency problem so i will open a new topic

avatar image

Answer by Piotr M. · Feb 04 at 01:46 PM

Here is the instruction how to install Plugin SDK:

https://www.dynatrace.com/support/help/extend-dyna...

Comment

People who like this

0 Show 0 · Share
10 |2000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 10 attachments (including images) can be used with a maximum of 52.4 MB each and 262.1 MB total.

Welcome to the
Dynatrace Community Forums

Check out the Forum User Guide and Forum Guidelines to learn how to get started.

Community Member of the Month
February 2019

Announcing Dynatrace's Community Member of the Month for February 2019, Larry R.! Click here to read more!

Employee Member of the Month
February 2019

Announcing Dynatrace's Employee Member of the Month for February 2019, Dave M.! Click here to read more!

Live webinar: AIOps done right through enhanced Dynatrace AI root cause detection

Learn the enhanced capabilities of the next generation Dynatrace AI root cause analysis and how to feed it with your own data sources.
Wednesday, February 20, 2019
Register today!

Live webinar: AIOps done right through enhanced Dynatrace AI root cause detection

Learn the enhanced capabilities of the next generation Dynatrace AI root cause analysis and how to feed it with your own data sources.
Wednesday, February 20, 2019
Register today!

NAM 2019 Beta is available

Would you like to have an early taste of what we have cooked up for 2019? We would love to hear your feedback and improve some of the new features. Check NAM 2019 Beta release notes.
Sign up today!

Follow this Question

Answers Answers and Comments

37 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Any news on release date of ActiveGate Plugin System? 2 Answers

How does alerting on custom plugin metrics work? 1 Answer

Activegate plugin "did not respond" error 2 Answers

activegate plugins and associated entities 2 Answers

Does Dynatrace plugin requires Active Gate to work? 1 Answer

Forum Tags

java user management dotnet redis docker ios davis log analytics gui mobileapp database cloud foundry usability services faq management zones user sessions test automation Dynatrace Managed amazon web services plugins php android javascript processes monitoring nodejs sso rest api appmon license dynatrace saas mobile monitoring user tagging installation nam aix oneagent sdk purepath network synthetic monitors apache hosts iis user actions paas azure http monitor linux mongodb mysql dashboard tipstricks rest openshift mission control activegate webserver servicenow kubernetes rum host monitoring cmc key user actions notifications openstack technologies configuration account continuous delivery tagging postgresql security smartscape high five award agent documentation alerting auto-detection cassandra administration vmware oneagent
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A
      • Enterprise Synthetic Monitoring
    • Synthetic Classic
      • Synthetic Classic Open Q&A
    • BSM Open Q&A