Using metering for compute resources
You can collect usage data of compute resources using Gnocchi. This time series database processes and stores measurement data of compute resources and provides access to it via REST API or the command-line tool.
Measurements can be sampled from such compute resources as virtual machines, VM disks and interfaces, compute networks, volumes, etc. All resources are being revised: if any attribute of a resource changes, this change is recorded in the history of the resource. For a VM, for example, you can measure the amount of allocated memory and virtual CPUs, as well as the memory and CPU usage.
An entity storing aggregates composed of a timestamp and value is called a metric. A metric is attached to a specific resource and associated to an archive policy. A policy defines how long aggregates are kept in a metric and how they are computed (minimum, maximum, average, etc.).
The following metrics are available for aggregation:
Metric | Type | Resource type | Description |
---|---|---|---|
memory
|
gauge | instance | Amount of RAM allocated to the VM, in megabytes |
memory.usage
|
gauge | instance | Percentage of RAM used by the VM |
vcpus
|
gauge | instance | Number of virtual CPUs allocated to the VM |
cpu
|
cumulative | instance | Amount of CPU time used by the VM, in nanoseconds |
disk.device.read.requests
|
cumulative | instance_disk | Number of read requests |
disk.device.write.requests
|
cumulative | instance_disk | Number of write requests |
disk.device.read.bytes
|
cumulative | instance_disk | Amount of data read, in bytes |
disk.device.write.bytes
|
cumulative | instance_disk | Amount of data written, in bytes |
network.incoming.bytes
|
cumulative | instance_network_interface | Incoming network traffic, in bytes |
network.outgoing.bytes
|
cumulative | instance_network_interface | Outgoing network traffic, in bytes |
network.incoming.packets
|
cumulative | instance_network_interface | Incoming network traffic, in packets |
network.outgoing.packets
|
cumulative | instance_network_interface | Outgoing network traffic, in packets |
image.size
|
gauge | image | Size of the uploaded image, in bytes |
volume.size
|
gauge | volume | Size of the volume, in gigabytes |
snapshot.size
|
gauge | volume | Size of the volume snapshot, in gigabytes |
magnum.cluster
|
gauge | coe_cluster | Number of Container Orchestration Engine (COE), that is, Kubernetes clusters |
Cumulative metrics are polled every 5 minutes and increase over time, while gauge metrics are updated on events and show fluctuating values.
For gauge metrics, the default archive policy is ceilometer-low
, and for cumulative metrics, it is ceilometer-low-rate
. These policies imply that all computed aggregates are kept for one day with 5-minute granularity and for one month with 1-hour granularity. The difference between them is in aggregation methods they use: the ceilometer-low
policy stores only mean values, while ceilometer-low-rate
stores mean values, as well as the average of delta values per interval.