Deploying custom plugin

I have written my custom plugin, what's next?

First of all make sure that your plugin.json file is valid and has every mandatory field defined. Pay special attention to the source section, where you must define:

  • package, that equals to your python plugin filename,
  • className, that equals the class name in your plugin,
  • install_requires, that lists external dependencies your plugin requires.
Example of source section
Download
"source": {
    "package": "demo_plugin",
    "className": "DemoPlugin",
    "install_requires": ["requests>=2.6.0"]
}

Place all the plugin files in one directory. Make sure that you installed Dynatrace ActiveGate plugin module on the ActiveGate where you want to deploy your plugin.

There are two ways to upload and deploy your plugin: using Plugin SDK, or using Dynatrace UI.

Deploy via Plugin SDK

Install ActiveGate pluign module, navigate to the directory with the plugin files and run the following command:

oneaget_build_plugin -t yourtoken

What happens?:

  • We upload your plugin to the tenant to whoch the the ActiveGate is connected,
  • We save the plugin in the directory accesbile to the ActiveGate plugin module.

Manual Deployment

You can also deploy your plugin manually and upload via Dynatrace UI.

  1. Copy the folder with your plugin files to plugin_deployment folder. By default, it's located in:
  • Linux: /opt/dynatrace/remotepluginmodule/plugin_deployment
  • Windows: C:\Program Files\dynatrace\remotepluginmodule\plugin_deployment
  1. Restart ActiveGate plugin module:
  • On Linux, restart the service with the following command with admin rights:

systemctl restart remotepluginmodule.service

  • On Windows, run these two following commands in Command Prompt launched as Admin:

sc stop "Dynatrace Remote Plugin Module"

sc start "Dynatrace Remote Plugin Module"

  1. Upload the plugin to your tenant using Dynatrace UI. Go to Settings > Monitored technolgies > Custom plugins tab. There you can either use Upload ActiveGate plugin button directly in Update plugins section or you can navigate to Settings > Monitored technolgies > Add new technology monitoring > Add ActiveGate plugin and use Upload Plugin button. In both cases, you have to select the plugin.json file or zipped folder containing all plugin files prepared earlier. Upload Remote Custom Plugin By UI Add ActiveGate plugin button Upload Custom Remote Plugin Last Step

Plugin Deployed

After a successful deployment, you should see your plugin ready for configuration in Dynatrace UI in Settings > Monitored technolgies > Custom plugins tab. Uploaded ActiveGate Plugin