Monitoring
A Dicer host tells you what it is doing in four ways:
| Source | What it is for |
|---|---|
| Prometheus metrics | Dashboards and alerts. |
dicer stats | What each instance uses of the host right now. |
| Events | What happened to each instance, snapshot, image, network, volume and kernel. |
| The daemon’s log | What the daemon did, including an audit of every change made through the API. |
Metrics
The daemon serves Prometheus metrics once you enable them in its configuration:
metrics:
enable: true
listen: 127.0.0.1:9101$ sudo systemctl restart dicerd
$ curl -s 127.0.0.1:9101/metrics | grep '^dicer_instances{'
dicer_instances{state="failed"} 0
dicer_instances{state="paused"} 0
dicer_instances{state="restarting"} 0
dicer_instances{state="running"} 3
dicer_instances{state="standby"} 1
dicer_instances{state="starting"} 0
dicer_instances{state="stopped"} 1
dicer_instances{state="stopping"} 0
The endpoint, /metrics, has no authentication. It shows how busy the host
is, what it runs and what each instance uses, but nothing from inside the
guests. Serve it on an address that only your Prometheus can reach, such as
0.0.0.0:9101 behind a firewall, and scrape it:
scrape_configs:
- job_name: dicer
static_configs:
- targets: ["dicer1.example.com:9101"]Every metric is listed in the metrics reference.
Alerts worth having
groups:
- name: dicer
rules:
- alert: DicerInstanceFailed
expr: dicer_instances{state="failed"} > 0
for: 5m
annotations:
summary: "{{ $value }} instance(s) failed on {{ $labels.instance }}"
- alert: DicerInstanceUnhealthy
expr: dicer_instances_health{status="unhealthy"} > 0
for: 5m
- alert: DicerInstancesRestarting
expr: increase(dicer_instance_restarts_total[15m]) > 3
- alert: DicerMemoryNearlyFull
expr: dicer_instances_memory_bytes / dicer_instances_memory_allocatable_bytes > 0.9
for: 15m
- alert: DicerNetworkNearlyFull
expr: dicer_network_addresses_available < 10
- alert: DicerOperationsFailing
expr: rate(dicer_instance_operations_total{outcome="error"}[10m]) > 0The lifecycle metrics count instances but do not name them. To find out
which instance failed, run dicer ps --filter state=failed on the host, or
read its events.
The instance stats metrics do name
them, by instance_id and name. Each running or paused instance has one
series. These queries show what an instance keeps busy and how much data it
moves:
rate(dicer_instance_cpu_seconds_total[5m]) # host CPUs, 1 = one CPU
dicer_instance_resident_memory_bytes # host memory resident
rate(dicer_instance_network_receive_bytes_total[5m]) # bytes received a second
rate(dicer_instance_disk_written_bytes_total[5m]) # bytes written a secondWatch the host’s disk as well, with the node exporter or similar. Overlay
disks and volumes are sparse, so the space they take grows as guests write. Standby and
memory snapshots also write each guest’s memory to disk in full.
dicer info shows how much disk is in use and how much has been
provisioned.
Instance stats
dicer stats shows what each running or paused instance uses of the host,
redrawn every second:
$ dicer stats
NAME CPUPERC MEMUSAGE MEMPERC NETIO BLOCKIO
db 200.00% 392.9 MiB / 2 GiB 19.19% 491.2 KiB / 11.4 KiB 0 B / 212.6 MiB
web 0.00% 158.7 MiB / 1 GiB 15.50% 1.3 KiB / 0 B 0 B / 12.5 MiB
The daemon reads these numbers on the host, from each instance’s hypervisor process and its TAP device. They work for any image, with nothing installed in the guest.
| Column | What it shows |
|---|---|
| CPUPerc | A share of one host CPU, so 200% is two CPUs kept busy. It counts the guest’s vCPUs and the hypervisor’s own threads, which emulate its devices. |
| MemUsage | The hypervisor’s resident host memory, then the guest memory the instance holds. |
| MemPerc | The first MemUsage figure as a share of the second. |
| NetIO | Bytes the guest received, then bytes it transmitted. |
| BlockIO | Bytes the hypervisor read from the host’s storage, then bytes it wrote. |
Memory is resident once the guest first touches it. When the guest frees it, the host takes it back a few seconds later, but the guest keeps the files it has read in its page cache, which is not free. MemUsage is what the instance costs the host now, which can be more than the guest’s programs are using.
BlockIO counts the instance’s disks and the hypervisor’s own files, such as the console log and a snapshot’s memory. It does not count reads the host serves from its page cache. Writes are counted when the hypervisor makes them, before they reach the disk.
NetIO and BlockIO are totals since the instance started. The column names
are also the fields of a --format template. --format json gives each
instance’s record instead, with its counts as numbers, such as
cpu_percent and resident_memory_bytes. Name instances to watch only
those, and use --no-stream to print the stats once, for scripts:
$ dicer stats --no-stream --format json
Prometheus has the same counters, and network packets, drops and errors as well. See the metrics reference.
Events
The daemon records what happens to each instance, snapshot, image, network, volume and kernel: created, started, exited, died, restarting, healthy, unhealthy, pulled, collected, imported, deleted and more. Each event has a message that says why. Every event and its attributes are listed in the events reference.
$ dicer events --since 1h # the last hour
$ dicer events --name web -n 20 # the last 20 about web
$ dicer events -f # follow new events as they happen
The daemon keeps events on the host, so they survive a restart of the
daemon. It keeps the last 10,000 by default. To keep more, fewer, or only
recent ones, set the events
section of the configuration.
--format json writes one event per line, for scripts. For example, to be
told when an instance dies:
$ dicer events -f --format json | jq -r 'select(.action == "died") | .name'
The daemon’s log
The daemon writes its log to standard output, which systemd sends to the journal:
$ journalctl -u dicerd -f
Each line is a message followed by key=value attributes. Most lines about
an instance carry instance=NAME, which makes them easy to find:
$ journalctl -u dicerd | grep 'instance=web'
Set log_level: debug in the configuration and restart the daemon for
more detail when tracking down a problem.
The audit log
The daemon logs every API call that can change something, with
component=audit. Calls that only read, such as Get and List calls,
are left out. Each line names the method, the resource it was called on,
who called it, its gRPC status code and how long it took:
$ journalctl -u dicerd | grep component=audit
time=2026-10-06T09:14:02.511Z level=INFO msg="call finished" component=audit method=StopInstance resource=web uid=1000 pid=48213 code=OK duration=2.10412875s
| Attribute | What it is |
|---|---|
resource | The name of the instance, snapshot, network, volume or kernel the call named, or the image’s reference. A call that names none, such as a prune, has no resource. |
uid, pid | On the Unix socket, the user and process that connected, as the kernel reports them. |
address | Over TCP, the address the call came from. |
token | Over TCP, the name of the token the call was made with. |