Clusters

Report cluster

For your plugin to report on your service cluster, report a Custom Device Group and create metric in the cluster specific style:

How to report cluster
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 cluster node

To report a cluster node you should report it as an ordinary Device Group.