Metrics
The Prometheus metrics the daemon serves at /metrics, once enabled with metrics.enable. Every metric of Dicer’s own is named dicer_. See Monitoring for scraping and alerts.
The endpoint also serves the Go runtime’s go_* metrics and the daemon process’s process_* metrics, and speaks OpenMetrics to a scraper that asks for it.
Daemon
| Metric | Type | Labels | Description |
|---|---|---|---|
dicer_build_info | gauge | version, commit, go_version | Build information for the running daemon. Always 1. The build is in its labels. |
The daemon’s uptime is time() - process_start_time_seconds.
Instances
| Metric | Type | Labels | Description |
|---|---|---|---|
dicer_instances | gauge | state | Instances defined on this host, by lifecycle state. Every state is present, at 0 if none. |
dicer_instances_health | gauge | status | Running instances whose health is checked, by what the check has found. status is starting, healthy or unhealthy. |
dicer_instances_vcpus | gauge | vCPUs held by instances that are starting, running or paused. | |
dicer_instances_memory_bytes | gauge | Guest memory held by instances that are starting, running or paused. | |
dicer_instances_vcpus_allocatable | gauge | vCPUs instances may hold in total. A start beyond it is refused. | |
dicer_instances_memory_allocatable_bytes | gauge | Guest memory instances may hold in total. A start beyond it is refused. | |
dicer_instance_operations_total | counter | operation, outcome | Instance lifecycle operations by operation (start, stop, pause, resume, standby, resize, delete, create_snapshot, restore_snapshot, delete_snapshot, fork_snapshot, fork_instance) and outcome. outcome is success or error. |
dicer_instance_operation_duration_seconds | histogram | operation | Time an instance lifecycle operation took. |
dicer_instance_restarts_total | counter | Restarts that instances’ restart policies attempted after they ended. |
The allocatable amounts are the host’s CPUs and memory, less the reserve, multiplied by the overcommit, as the configuration’s resources sets them. See Capacity.
Instance stats
| Metric | Type | Labels | Description |
|---|---|---|---|
dicer_instance_cpu_seconds_total | counter | instance_id, name | CPU time an instance’s hypervisor process has used, user and system. Its vCPUs and the threads emulating its devices together. rate() of it is the host CPUs it keeps busy. |
dicer_instance_vcpus | gauge | instance_id, name | vCPUs an instance holds. rate(dicer_instance_cpu_seconds_total[1m]) / dicer_instance_vcpus is how busy it keeps them. |
dicer_instance_resident_memory_bytes | gauge | instance_id, name | Host memory resident for an instance’s hypervisor process. The guest memory backed so far, and the hypervisor’s own. Memory a guest frees stays resident. |
dicer_instance_memory_bytes | gauge | instance_id, name | Guest memory an instance holds. dicer_instance_resident_memory_bytes / dicer_instance_memory_bytes is how much of it is resident. |
dicer_instance_disk_read_bytes_total | counter | instance_id, name | Bytes an instance’s hypervisor process read from storage. The instance’s disks, and the hypervisor’s own files, such as the console log and a snapshot’s memory. Reads served from the host’s page cache are not counted. |
dicer_instance_disk_written_bytes_total | counter | instance_id, name | Bytes an instance’s hypervisor process wrote to storage. The instance’s disks, and the hypervisor’s own files, such as the console log and a snapshot’s memory. Counted as the process writes, before the data reaches the disk. |
dicer_instance_network_receive_bytes_total | counter | instance_id, name | Bytes an instance’s guest received on its network interface. |
dicer_instance_network_transmit_bytes_total | counter | instance_id, name | Bytes an instance’s guest transmitted on its network interface. |
dicer_instance_network_receive_packets_total | counter | instance_id, name | Packets an instance’s guest received on its network interface. |
dicer_instance_network_transmit_packets_total | counter | instance_id, name | Packets an instance’s guest transmitted on its network interface. |
dicer_instance_network_receive_drops_total | counter | instance_id, name | Packets dropped on their way to an instance’s guest. Mostly the guest not taking packets as fast as they come. |
dicer_instance_network_transmit_drops_total | counter | instance_id, name | Packets an instance’s guest transmitted that the host dropped. |
dicer_instance_network_receive_errors_total | counter | instance_id, name | Packets to an instance’s guest that failed with an error. |
dicer_instance_network_transmit_errors_total | counter | instance_id, name | Packets from an instance’s guest that failed with an error. |
What each running or paused instance uses of the host, read from its hypervisor process and TAP device, with nothing asked of the guest. A series begins again each time the instance starts, and is gone while it is stopped. dicer stats shows the same live.
Images
| Metric | Type | Labels | Description |
|---|---|---|---|
dicer_images | gauge | Images held on this host. | |
dicer_image_disk_bytes | gauge | Total size of the bootable disks those images were converted to. | |
dicer_image_pulls_total | counter | outcome | Image pulls that reached a registry, by outcome. Cache hits are not pulls. outcome is success or error. |
dicer_image_pull_duration_seconds | histogram | Time a pull took, from resolving the reference to a bootable disk. | |
dicer_image_pulled_bytes_total | counter | Compressed layer bytes pulls downloaded from registries. | |
dicer_image_conversion_duration_seconds | histogram | Time spent packing an unpacked image into its EROFS disk. | |
dicer_image_cache_lookups_total | counter | result | Image lookups by whether this host already held the image. result is hit or miss. |
dicer_image_gc_collected_total | counter | reason | Images garbage collection removed, by reason (unused, size). |
dicer_image_gc_reclaimed_bytes_total | counter | Disk image garbage collection gave back: bootable disks and cached layers. |
Kernels
| Metric | Type | Labels | Description |
|---|---|---|---|
dicer_kernels | gauge | Kernels defined on this host. | |
dicer_kernel_disk_bytes | gauge | Total size of those kernels on this host’s disk. |
Volumes
| Metric | Type | Labels | Description |
|---|---|---|---|
dicer_volumes | gauge | Volumes defined on this host. | |
dicer_volume_size_bytes | gauge | Total size of those volumes, as their guests see it. | |
dicer_volume_disk_bytes | gauge | Disk those volumes take up on this host. Volumes are sparse files that take up disk as guests write to them, so it is less than dicer_volume_size_bytes until they fill. A block a guest frees may stay taken. |
Networks
| Metric | Type | Labels | Description |
|---|---|---|---|
dicer_network_addresses_allocated | gauge | network | Addresses currently assigned to instances on a network. |
dicer_network_addresses_available | gauge | network | Assignable addresses still free on a network. The network, broadcast and gateway addresses are not counted. |
DNS
| Metric | Type | Labels | Description |
|---|---|---|---|
dicer_dns_queries_total | counter | network, result | DNS queries guests sent a network’s server, by how they were answered. result is local, from the network’s own names, found or not; forwarded, answered by an upstream nameserver; failed, by none, with SERVFAIL; invalid, not one query; or dropped, for the server being too busy. A TCP connection closed for that counts as one query dropped. |
dicer_dns_forward_duration_seconds | histogram | network | Time asking a network’s upstream nameservers for an answer took, answered or not. Each is asked in turn until one answers, for up to 3 seconds each. |
What each network’s DNS server, on its gateway address, has answered. There is none while the configuration’s network.dns is off.
API
| Metric | Type | Labels | Description |
|---|---|---|---|
dicer_grpc_requests_total | counter | method, code | gRPC calls served, by full method and response code. code is the gRPC status code, such as OK or NotFound. |
dicer_grpc_request_duration_seconds | histogram | method | Time a gRPC call took, from the first byte to the final status. For a stream, such as dicer logs -f, it is how long the client stayed. |