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.
Devices are the foundation of the topologies. Each device may represent a service (database, file server, router, etc). Metrics, events, and properties can be reported on the device level. A device group is a set of devices. Properties can also be reported on a device group level.
To report devices and device groups, use the topology_builder
object. The object is accessible as a property of RemoteBasePlugin
class, which you can use to create a device group.
Whenever possible, assign IP addresses and ports to devices. Dynatrace AI requires this to detect dependencies among components.
By default, the device technology assignment is defined in the extension JSON file. Additionally, multiple IP addresses and ports assigned to one device can be reported. You can use them to match discovered services with a specific device.
add_endpoint
method allows setting IP addresses, DNS names and ports.
ip
is a single string and it's required.dnsNames
name is a list of strings separated with commas.port
number, port_list
or range_list
.Usage examples:
add_endpoint("1.1.1.1")add_endpoint(ip="1.1.1.1")add_endpoint("172.18.19.241", 4581)add_endpoint(ip="1.1.1.1", port=80)add_endpoint(ip="1.1.1.1", port=80, dnsNames=["name.com"])add_endpoint(ip="1.1.1.1", port=80, dnsNames=["name.com"], port_list=[88,8080], range_list=[(680, 690), (880, 900)])add_endpoint(ip="1.1.1.1", port=None, dnsNames=["name.com"], port_list=None, range_list=[(80, 88), (447, 450)])
There is a limit of 100 ports to be reported per one device in one minute. Exceeding this limit will cause config exception.
from ruxit.api.base_plugin import RemoteBasePluginclass MyPlugin(RemoteBasePlugin):def query(self, **kwargs):group = self.topology_builder.create_group("My group", "My group")device = group.create_element("My device", "My device")device.report_property("my_property", "First device")device.add_endpoint("172.18.19.241", 4581)device.relative("my_device_counter", 2)
{"name": "custom.remote.python.my_plugin","version": "1.001","type": "python","entity": "CUSTOM_DEVICE","metricGroup": "my_plugin","processTypeNames": ["PYTHON"],"technologies": ["example technology"],"source": {"package": "my_plugin","className": "MyPlugin","activation": "Remote"},"metrics": [{"timeseries": {"key": "my_device_counter","unit": "Count","displayname": "my counter"}}]}
By default, the device group technology assignment is defined in the extension JSON file.
from ruxit.api.base_plugin import RemoteBasePluginclass MyPlugin(RemoteBasePlugin):def query(self, **kwargs):group = self.topology_builder.create_group("My group", "My group")group.report_property("my_property", "First group")group.absolute("my_group_counter", 1)
{"name": "custom.remote.python.my_plugin","version": "1.001","type": "python","entity": "CUSTOM_DEVICE","metricGroup": "my_plugin","processTypeNames": ["PYTHON"],"technologies": ["example technology"],"source": {"package": "my_plugin","className": "MyPlugin","activation": "Remote"},"metrics": [{"entity": "PROCESS_GROUP","timeseries": {"key": "my_group_counter","unit": "Count","displayname": "my counter"}}],"ui": {"pgmetrics": [{"key": "my_group_counter","displayname": "My counter"}]}}