Extension configuration
OneAgent and ActiveGate version 1.299 are the last versions supporting OneAgent and ActiveGate Extensions 1.0 framework. You can continue using Extensions 1.0 if you stay at OneAgent or ActiveGate version 1.299. Note that this means you'll be using an unsupported Python version 3.8. We strongly recommend migrating your extensions to the latest Extensions 2.0 framework.
For more information, see General guidance and how to migrate.
ActiveGate extensions are designed to monitor remote technologies that are beyond the reach of Dynatrace OneAgent. Because of that, each device needs to be defined explicitly. We call it the technology endpoint
and define it using the extension configuration.
Apart from Endpoint name
and Choose ActiveGate
fields, you can specify your own in the extension JSON. The values you set in the UI are later available to refer to in the extension Python code.
You can choose from the following property types:
- String
- Boolean
- Integer
- Float
- Password
- Textarea
- Dropdown
How to implement and use extension configuration
JSON declaration
Edit the properties
section to declare the extension configuration. Each property consists of the following fields:
key
- unique id of the propertytype
- one from listed abovedefaultValue
(optional) - value of the property when none specifieddropdownValues
(optional) - used only for Dropdown property type. It must not be empty and you must declare a default value.
{"url": "http://localhost:8769"}
The extension JSON enables you to provide the description of your properties. This is optional, but it gives you control over the look and feel of your configuration in the UI. Edit the configUI
section to describe your properties presentation.
{"configUI": {"displayName": "My plugin","properties": [{"key": "string_prop","displayName": "String property","displayOrder": 1},{"key": "boolean_prop","displayName": "Boolean property","displayOrder": 2},{"key": "integer_prop","displayName": "Integer property","displayOrder": 3},{"key": "float_prop","displayName": "Float property","displayOrder": 4},{"key": "password_prop","displayName": "Password property","displayHint": "hint","displayOrder": 5},{"key": "textarea_prop","displayName": "Textarea property","displayHint": "hint","displayOrder": 6},{"key": "dropdown_prop","displayName": "Dropdown property","displayOrder": 7}]}}
key
- matches UI config with propertydisplayName
- describes input label. Property key will be used if not specified.displayHint
- describes placeholder for property input. Empty by default.displayOrder
- allows input order change. By default it goes with declaration order.
See Extensions reference for more details.
Python usage
When working with the python code, you can read the configuration as in the example below:
def initialize(self, **kwargs):config = kwargs['config']string_prop = config['string_prop']boolean_prop = config['boolean_prop']integer_prop = config['integer_prop']float_prop = config['float_prop']password_prop = config['password_prop']textarea_prop = config['textarea_prop']dropdown_prop = config['dropdown_prop']