Report on custom devices and custom device groups

"Custom devices" are the foundation of the topologies. Each custom device represents a service (database, file server, router, etc). Metrics, events, and custom properties can be reported on the custom device level. A custom device group is a set of custom group devices. Custom properties can also be reported on a custom device group level.

To report custom devices and custom device groups, use the topology_builder object. The object is accessible as a property of RemoteBasePlugin class, which you can use 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.

Report on custom devices

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 a specific custom device.

How to report on a 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_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)

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"}
		}
	]
}

Report on custom device groups

By default, the custom device group technology assignment is defined in the plugin JSON file.

How to report on custom device groups
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"
	} ]
}