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
| Property | Type | Restrictions | Description |
|---|---|---|---|
| Id | string | Required Length: 1 - 256Pattern: ^[\w\.\-]+$ | The unique identifier of the group. |
| Label | string | Required Length: 1 - 64 | The textual label of the group. Longer labels are truncated. |
| Description | string? | Max length: 256 | An optional textual description of the group. |
| Icon | string? | Length: 1 - 256Pattern: ^[\w\.\-]+$ | An optional icon (the ID of a registered Icon). |
| SubGroups | IEnumerable<Group>? | Max. 10 sub-groups | Optional 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);