Provided metrics¶
LXD provides a number of instance metrics and internal metrics. See How to monitor metrics for instructions on how to work with these metrics.
Instance metrics¶
The following instance metrics are provided:
Metric |
Description |
---|---|
|
Total number of effective CPUs |
|
Total number of CPU time used (in seconds) |
|
Total number of bytes read |
|
Total number of completed reads |
|
Total number of bytes written |
|
Total number of completed writes |
|
Available space (in bytes) |
|
Free space (in bytes) |
|
Size of the file system (in bytes) |
|
Amount of anonymous memory on active LRU list |
|
Amount of memory on active LRU list |
|
Amount of file-backed memory on active LRU list |
|
Amount of cached memory |
|
Amount of memory waiting to be written back to the disk |
|
Amount of free memory for |
|
Amount of used memory for |
|
Amount of anonymous memory on inactive LRU list |
|
Amount of memory on inactive LRU list |
|
Amount of file-backed memory on inactive LRU list |
|
Amount of mapped memory |
|
Amount of available memory |
|
Amount of free memory |
|
Amount of used memory |
|
The number of out-of-memory kills |
|
Amount of anonymous and swap cache memory |
|
Amount of cached file system data that is swap-backed |
|
Amount of used swap memory |
|
Amount of unevictable memory |
|
Amount of memory queued for syncing to disk |
|
Amount of received bytes on a given interface |
|
Amount of received dropped bytes on a given interface |
|
Amount of received errors on a given interface |
|
Amount of received packets on a given interface |
|
Amount of transmitted bytes on a given interface |
|
Amount of transmitted dropped bytes on a given interface |
|
Amount of transmitted errors on a given interface |
|
Amount of transmitted packets on a given interface |
|
Number of running processes |
Internal metrics¶
The following internal metrics are provided:
Metric |
Description |
---|---|
|
Total number of completed requests. See API rates metrics. |
|
Number of requests currently being handled. See API rates metrics. |
|
Total number of bytes allocated (even if freed) |
|
Number of bytes allocated and still in use |
|
Number of bytes used by the profiling bucket hash table |
|
Total number of frees |
|
Number of bytes used for garbage collection system metadata |
|
Number of goroutines that currently exist |
|
Number of heap bytes allocated and still in use |
|
Number of heap bytes waiting to be used |
|
Number of heap bytes that are in use |
|
Number of allocated objects |
|
Number of heap bytes released to OS |
|
Number of heap bytes obtained from system |
|
Total number of pointer lookups |
|
Total number of |
|
Number of bytes in use by |
|
Number of bytes used for |
|
Number of bytes in use by |
|
Number of bytes used for |
|
Number of heap bytes when next garbage collection will take place |
|
Number of bytes used for other system allocations |
|
Number of bytes in use by the stack allocator |
|
Number of bytes obtained from system for stack allocator |
|
Number of bytes obtained from system |
|
Number of running operations |
|
Daemon uptime (in seconds) |
|
Number of active warnings |
API rates metrics¶
The API rates metrics include lxd_api_requests_completed_total
and lxd_api_requests_ongoing
. These metrics can be consumed by an observability tool deployed externally (for example, the Canonical Observability Stack or another third-party tool) to help identify failures or overload on a LXD server. You can set thresholds on the observability tools for these metrics’ values to trigger alarms and take programmatic actions.
These metrics consider all endpoints in the LXD REST API, with the exception of the /
endpoint. Requests using an invalid URL are also counted. Requests against the metrics server are also counted. Both introduced metrics include a label entity_type
based on the main entity type that the endpoint is operating on.
lxd_api_requests_ongoing
contains the number of requests that are not yet completed by the time the metrics are queried. A request is considered completed when the response is returned to the client and any asynchronous operations spawned by that request are done. lxd_api_requests_completed_total
contains the number of completed requests. This metric includes an additional label named result
based on the outcome of the request. The label can have one of the following values:
error_server
, for errors on the server side, this includes responses with HTTP status codes from 500 to 599. Any failed asynchronous operations also fall into this category.error_client
, for responses with HTTP status codes from 400 to 499, indicating an error on the client side.succeeded
, for endpoints that executed successfully.