Topology

topology_builder object

The topology_builder object is used to report Custom Devices and Custom Device Groups. The object is accessible as a property of RemoteBasePlugin class. You use it to create a Custom Device Group.

Whenever possible, assign IP addresses and ports to Custom Devices. Dynatrace AI requires this to detect dependencies among components.

Reporting Custom Device Group

Custom Device Group is set of Custom Group Devices. Metrics, events and custom properties can be reported on a Custom Device Group level. By default, the Custom Device Group technology assignment is defined the plugin JSON file.

How to report Custom Group
Download
from ruxit.api.base_plugin import RemoteBasePlugin

class 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)

JSON essential
Download
{
	"name": "custom.remote.python.my_plugin",
	"version": "1.001",
	"type": "python",
	"entity": "CUSTOM_DEVICE",
	"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"
	} ]
}

Reporting Custom Device

Custom Device is a foundation of the topologies. It represents a service (database, file server, router, etc.). Metrics, events and custom properties can be reported on a Custom Device level. By default, the Custom Device technology assignment is defined in the plugin JSON file. Additionally, multiple IP addresses and ports assigned to one Custom Device can be reported. You can use them to match discovered services with specific Custom Device.

How to report Custom Device
Download
from ruxit.api.base_plugin import RemoteBasePlugin

class MyPlugin(RemoteBasePlugin):

	def query(self, **kwargs):
		group = self.topology_builder.create_group("My group", "My group")
		device = group.create_device("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)

JSON essential
Download
{
	"name": "custom.remote.python.my_plugin",
	"version": "1.001",
	"type": "python",
	"entity": "CUSTOM_DEVICE",
	"processTypeNames": ["PYTHON"],
	"technologies": ["example technology"],
	"source": {
		"package": "my_plugin",
		"className": "MyPlugin",
		"activation": "Remote"
	},
	"metrics": [
		{
			"timeseries": {
				"key": "my_device_counter", 
				"unit": "Count", 
				"displayname": "my counter"}
		}
	]
}