Report on device groups and devices

You can set up reporting on device groups or individual devices.

Report on a device group

For your plugin to report on a service device group, report a custom device group and create a metric using the methods designed for device groups:

How to report device group
Download
from ruxit.api.base_plugin import RemoteBasePlugin

class MyPlugin(RemoteBasePlugin):
	def query(self, **kwargs):
		group = self.topology_builder.create_group("My cluster", "My cluster")
		group.absolute("my_cluster_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_cluster_counter", 
				"unit": "Count", 
				"displayname": "my counter"},
			"source": {"type": "cluster"}
		}
	],
	"ui": {
		"charts" : [ {
			"group": "My cluster",
			"title": "Counters",
			"series": [ {
				"key": "my_cluster_counter",
				"displayname": "My counter",
			}]	
		} ]
	}
}

Report on a device

To report on a group element (device) you should report it as an ordinary device group.