Skip to main content

Group

A Group organizes items that share a common context (e.g., all metrics of the primary GPU, or all metrics of a single CPU core).
In contrast to a Category, a group is optional and may contain items from different categories.

See also: Registering Items

Properties

PropertyTypeRestrictionsDescription
IdstringRequired
Length: 1 - 256
Pattern: ^[\w\.\-]+$
The unique identifier of the group.
LabelstringRequired
Length: 1 - 64
The textual label of the group. Longer labels are truncated.
Descriptionstring?Max length: 256An optional textual description of the group.
Iconstring?Length: 1 - 256
Pattern: ^[\w\.\-]+$
An optional icon (the ID of a registered Icon).
SubGroupsIEnumerable<Group>?Max. 10 sub-groupsOptional sub-groups nested within the group.

Example

Groups are created using the MoBroItem.CreateGroup() builder and must be registered before any item references them:

var gpuGroup = MoBroItem
.CreateGroup()
.WithId("gpu_0")
.WithLabel("GPU 0", "The primary graphics card")
.Build();

var gpuTemperature = MoBroItem
.CreateMetric()
.WithId("gpu_0_temperature")
.WithLabel("Temperature")
.OfType(CoreMetricType.Temperature)
.OfCategory(CoreCategory.Gpu)
.OfGroup(gpuGroup)
.Build();

_mobro.Register(gpuGroup);
_mobro.Register(gpuTemperature);