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.

MethodRequestResponseDescription
ListCountersEmptyListCountersResponse

The counter catalogue.

ListAvailableMetricsListAvailableMetricsRequestListAvailableMetricsResponse

Counters and instances with data for an entity at an interval.

QueryMetricsQueryMetricsRequestQueryMetricsResponse

Samples by entity, counter, interval and time range.

QueryUsageQueryUsageRequestQueryUsageResponse

The usage ledger (needs Kyvernon.Usage.Read on the root).

Messages

PerfCounter

A performance counter of the catalogue.

FieldNumberTypeDescription
id1int32

Stable id (vCenter's where one exists; 900000 and up otherwise).

name2string

group.name.rollup

group3string

Counter group (cpu, mem, net, ...).

label4string

Short name to show.

summary5string

What the counter measures.

rollup6string

How samples are combined over time (average, maximum, ...).

unit7string

Unit of the values.

stats_type8string

Kind of statistic (absolute, delta, rate).

level9uint32

Collection level of the aggregate.

per_device_level10uint32

Collection level of the per-device instances.

metric11string

Name of the Prometheus metric with the same values.

instances_only12bool

The counter has per-instance values only, no aggregate.

ListCountersResponse

The counter catalogue.

FieldNumberTypeDescription
counters1repeated PerfCounter

Every counter.

ListAvailableMetricsRequest

Asks which counters have data for an object.

FieldNumberTypeDescription
entity1string

Id of the object.

interval2uint32

0 = 20 for hosts and VMs, 300 for datastores.

AvailableMetric

A counter with data for the object.

FieldNumberTypeDescription
counter_id1int32

Id of the counter.

counter2string

Name of the counter.

instance3string

Instance (device); empty for the aggregate.

ListAvailableMetricsResponse

Counters with data.

FieldNumberTypeDescription
interval1uint32

Sampling period in seconds the list is for.

metrics2repeated AvailableMetric

Counters and instances with data.

QueryMetricsRequest

Queries samples.

FieldNumberTypeDescription
entities1repeated string

Ids of the objects.

counters2repeated string

Counter names or ids.

interval3uint32

0 = default (20 for hosts and VMs, 300 for datastores).

start4string

RFC 3339; empty = as far back as kept / now.

end5string

RFC 3339; empty = now.

instance6string

"" aggregate, "*" all instances and the aggregate, or one instance.

max_samples7uint32

0 = no limit.

MetricSeries

Samples of one counter and instance of one object.

FieldNumberTypeDescription
entity1string

Id of the object.

counter_id2int32

Id of the counter.

counter3string

Name of the counter.

instance4string

Instance; empty for the aggregate.

unit5string

Unit of the values.

interval6uint32

Sampling period in seconds.

timestamps7repeated int64

Interval end times (Unix seconds) and values; percent values are 0..100.

values8repeated double

Values in the order of timestamps.

QueryMetricsResponse

The samples.

FieldNumberTypeDescription
series1repeated MetricSeries

One series per object, counter and instance.

QueryUsageRequest

Queries the usage ledger.

FieldNumberTypeDescription
from1string

YYYY-MM-DD, inclusive.

to2string

YYYY-MM-DD, inclusive.

group_by3string

vm (default), tenant, resourcePool, folder, host.

period4string

day (default), month, total.

UsageLine

Usage of one group in one period.

FieldNumberTypeDescription
period1string

The day, month or total the line covers.

key2string

Id of the group (virtual machine, tenant, resource group, folder or host).

name3string

Name of the group.

vms4uint32

Virtual machines counted.

powered_on_hours5double

Hours powered on.

vcpu_hours6double

vCPU hours.

ram_gib_hours7double

Memory in GiB hours.

provisioned_gib_hours8double

Provisioned disk in GiB hours.

used_gib_hours9double

Used disk in GiB hours.

net_rx_gib10double

Received network traffic in GiB.

net_tx_gib11double

Sent network traffic in GiB.

net_rx_bytes12uint64

Received network traffic in bytes.

net_tx_bytes13uint64

Sent network traffic in bytes.

QueryUsageResponse

Usage lines.

FieldNumberTypeDescription
lines1repeated UsageLine

One line per group and period.

Version 0.1.