Reference For: developers
gRPC: metrics
Services, methods, messages and enums of metrics.proto.
Performance metrics and usage (decision L-81, docs/control-plane/METRICS.md): the same operations as REST /v1/metrics/* and /v1/usage.
MetricsService
Performance counters, samples and the usage ledger.
Messages
PerfCounter
A performance counter of the catalogue.
| Field | Number | Type | Description |
|---|
id | 1 | int32 | Stable id (vCenter's where one exists; 900000 and up otherwise). |
|---|
name | 2 | string | group.name.rollup |
|---|
group | 3 | string | Counter group (cpu, mem, net, ...). |
|---|
label | 4 | string | Short name to show. |
|---|
summary | 5 | string | What the counter measures. |
|---|
rollup | 6 | string | How samples are combined over time (average, maximum, ...). |
|---|
unit | 7 | string | Unit of the values. |
|---|
stats_type | 8 | string | Kind of statistic (absolute, delta, rate). |
|---|
level | 9 | uint32 | Collection level of the aggregate. |
|---|
per_device_level | 10 | uint32 | Collection level of the per-device instances. |
|---|
metric | 11 | string | Name of the Prometheus metric with the same values. |
|---|
instances_only | 12 | bool | The counter has per-instance values only, no aggregate. |
|---|
ListCountersResponse
The counter catalogue.
| Field | Number | Type | Description |
|---|
counters | 1 | repeated PerfCounter | Every counter. |
|---|
ListAvailableMetricsRequest
Asks which counters have data for an object.
| Field | Number | Type | Description |
|---|
entity | 1 | string | Id of the object. |
|---|
interval | 2 | uint32 | 0 = 20 for hosts and VMs, 300 for datastores. |
|---|
AvailableMetric
A counter with data for the object.
| Field | Number | Type | Description |
|---|
counter_id | 1 | int32 | Id of the counter. |
|---|
counter | 2 | string | Name of the counter. |
|---|
instance | 3 | string | Instance (device); empty for the aggregate. |
|---|
ListAvailableMetricsResponse
Counters with data.
| Field | Number | Type | Description |
|---|
interval | 1 | uint32 | Sampling period in seconds the list is for. |
|---|
metrics | 2 | repeated AvailableMetric | Counters and instances with data. |
|---|
QueryMetricsRequest
Queries samples.
| Field | Number | Type | Description |
|---|
entities | 1 | repeated string | Ids of the objects. |
|---|
counters | 2 | repeated string | Counter names or ids. |
|---|
interval | 3 | uint32 | 0 = default (20 for hosts and VMs, 300 for datastores). |
|---|
start | 4 | string | RFC 3339; empty = as far back as kept / now. |
|---|
end | 5 | string | RFC 3339; empty = now. |
|---|
instance | 6 | string | "" aggregate, "*" all instances and the aggregate, or one instance. |
|---|
max_samples | 7 | uint32 | 0 = no limit. |
|---|
MetricSeries
Samples of one counter and instance of one object.
| Field | Number | Type | Description |
|---|
entity | 1 | string | Id of the object. |
|---|
counter_id | 2 | int32 | Id of the counter. |
|---|
counter | 3 | string | Name of the counter. |
|---|
instance | 4 | string | Instance; empty for the aggregate. |
|---|
unit | 5 | string | Unit of the values. |
|---|
interval | 6 | uint32 | Sampling period in seconds. |
|---|
timestamps | 7 | repeated int64 | Interval end times (Unix seconds) and values; percent values are 0..100. |
|---|
values | 8 | repeated double | Values in the order of timestamps. |
|---|
QueryMetricsResponse
The samples.
| Field | Number | Type | Description |
|---|
series | 1 | repeated MetricSeries | One series per object, counter and instance. |
|---|
QueryUsageRequest
Queries the usage ledger.
| Field | Number | Type | Description |
|---|
from | 1 | string | YYYY-MM-DD, inclusive. |
|---|
to | 2 | string | YYYY-MM-DD, inclusive. |
|---|
group_by | 3 | string | vm (default), tenant, resourcePool, folder, host. |
|---|
period | 4 | string | day (default), month, total. |
|---|
UsageLine
Usage of one group in one period.
| Field | Number | Type | Description |
|---|
period | 1 | string | The day, month or total the line covers. |
|---|
key | 2 | string | Id of the group (virtual machine, tenant, resource group, folder or host). |
|---|
name | 3 | string | Name of the group. |
|---|
vms | 4 | uint32 | Virtual machines counted. |
|---|
powered_on_hours | 5 | double | Hours powered on. |
|---|
vcpu_hours | 6 | double | vCPU hours. |
|---|
ram_gib_hours | 7 | double | Memory in GiB hours. |
|---|
provisioned_gib_hours | 8 | double | Provisioned disk in GiB hours. |
|---|
used_gib_hours | 9 | double | Used disk in GiB hours. |
|---|
net_rx_gib | 10 | double | Received network traffic in GiB. |
|---|
net_tx_gib | 11 | double | Sent network traffic in GiB. |
|---|
net_rx_bytes | 12 | uint64 | Received network traffic in bytes. |
|---|
net_tx_bytes | 13 | uint64 | Sent network traffic in bytes. |
|---|
QueryUsageResponse
Usage lines.
| Field | Number | Type | Description |
|---|
lines | 1 | repeated UsageLine | One line per group and period. |
|---|
Version 0.1.