Skip to content
Docs
Events

Events

Introduction

Events are messages about actions that have occurred over LXD. Using the API endpoint /1.0/events directly or via lxc monitor will connect to a WebSocket through which logs and life-cycle messages will be streamed.

Event types

LXD Currently supports three event types.

  • logging: Shows all logging messages regardless of the server logging level.
  • operation: Shows all ongoing operations from creation to completion (including updates to their state and progress metadata).
  • lifecycle: Shows an audit trail for specific actions occurring over LXD.

Event structure

Example

location: cluster_name
metadata:
  action: network-updated
  requestor:
    protocol: unix
    username: root
  source: /1.0/networks/lxdbr0
timestamp: "2021-03-14T00:00:00Z"
type: lifecycle
  • location: The cluster member name (if clustered).
  • timestamp: Time that the event occurred in RFC3339 format.
  • type: The type of event this is (one of logging, operation, or lifecycle).
  • metadata: Information about the specific event type.

Logging event structure

  • message: The log message.
  • level: The log-level of the log.
  • context: Additional information included in the event.

Operation event structure

  • id: The UUID of the operation.
  • class: The type of operation (task, token, or websocket).
  • description: A description of the operation.
  • created_at: The operation’s creation date.
  • updated_at: The operation’s date of last change.
  • status: The current state of the operation.
  • status_code: The operation status code.
  • resources: Resources affected by this operation.
  • metadata: Operation specific metadata.
  • may_cancel: Whether the operation may be canceled.
  • err: Error message of the operation.
  • location: The cluster member name (if clustered).

Life-cycle event structure

  • action: The life-cycle action that occurred.
  • requestor: Information about who is making the request (if applicable).
  • source: Path to what is being acted upon.
  • context: Additional information included in the event.

Supported life-cycle events

NameDescriptionAdditional Information
certificate-createdA new certificate has been added to the server trust store.
certificate-deletedThe certificate has been deleted from the trust store.
certificate-updatedThe certificate’s configuration has been updated.
cluster-certificate-updatedThe certificate for the whole cluster has changed.
cluster-disabledClustering has been disabled for this machine.
cluster-enabledClustering has been enabled for this machine.
cluster-group-createdA new cluster group has been created.
cluster-group-deletedA cluster group has been deleted.
cluster-group-renamedA cluster group has been renamed.
cluster-group-updatedA cluster group has been updated.
cluster-member-addedA new machine has joined the cluster.
cluster-member-removedThe cluster member has been removed from the cluster.
cluster-member-renamedThe cluster member has been renamed.old_name: the previous name.
cluster-member-updatedThe cluster member’s configuration been edited.
cluster-token-createdA join token for adding a cluster member has been created.
config-updatedThe server configuration has changed.
image-alias-createdAn alias has been created for an existing image.target: the original instance.
image-alias-deletedAn alias has been deleted for an existing image.target: the original instance.
image-alias-renamedThe alias for an existing image has been renamed.old_name: the previous name.
image-alias-updatedThe configuration for an image alias has changed.target: the original instance.
image-createdA new image has been added to the image store.type: container or vm.
image-deletedThe image has been deleted from the image store.
image-refreshedThe local image copy has updated to the current source image version.
image-retrievedThe raw image file has been downloaded from the server.target: destination server.
image-secret-createdA one-time key to fetch this image has been created.
image-updatedThe image’s configuration has changed.
instance-backup-createdA backup of the instance has been created.
instance-backup-deletedThe instance backup has been deleted.
instance-backup-renamedThe instance backup has been renamed.old_name: the previous name.
instance-backup-retrievedThe raw instance backup file has been downloaded.
instance-consoleConnected to the console of the instance.type: console or vga.
instance-console-resetThe console buffer has been reset.
instance-console-retrievedThe console log has been downloaded.
instance-createdA new instance has been created.
instance-deletedThe instance has been deleted.
instance-execA command has been executed on the instance.command: the command to be executed.
instance-file-deletedA file on the instance has been deleted.file: path to the file.
instance-file-pushedThe file has been pushed to the instance.file-source: local file path. file-destination: destination file path. info: file information.
instance-file-retrievedThe file has been downloaded from the instance.file-source: instance file path. file-destination: destination file path.
instance-log-deletedThe instance’s specified log file has been deleted.
instance-log-retrievedThe instance’s specified log file has been downloaded.
instance-metadata-retrievedThe instance’s image metadata has been downloaded.
instance-metadata-template-createdA new image template file for the instance has been created.path: relative file path.
instance-metadata-template-deletedThe image template file for the instance has been deleted.path: relative file path.
instance-metadata-template-retrievedThe image template file for the instance has been downloaded.path: relative file path.
instance-metadata-updatedThe instance’s image metadata has changed.
instance-pausedThe instance has been put in a paused state.
instance-readyThe instance is ready.
instance-renamedThe instance has been renamed.old_name: the previous name.
instance-restartedThe instance has restarted.
instance-restoredThe instance has been restored from a snapshot.snapshot: name of the snapshot being restored.
instance-resumedThe instance has resumed after being paused.
instance-shutdownThe instance has shut down.
instance-snapshot-createdA snapshot of the instance has been created.
instance-snapshot-deletedThe instance snapshot has been deleted.
instance-snapshot-renamedThe instance snapshot has been renamed.old_name: the previous name.
instance-snapshot-updatedThe instance snapshot’s configuration has changed.
instance-startedThe instance has started.
instance-stoppedThe instance has stopped.
instance-updatedThe instance’s configuration has changed.
network-acl-createdA new network ACL has been created.
network-acl-deletedThe network ACL has been deleted.
network-acl-renamedThe network ACL has been renamed.old_name: the previous name.
network-acl-updatedThe network ACL configuration has changed.
network-createdA network device has been created.
network-deletedThe network device has been deleted.
network-forward-createdA new network forward has been created.
network-forward-deletedThe network forward has been deleted.
network-forward-updatedThe network forward has been updated.
network-peer-createdA new network peer has been created.
network-peer-deletedThe network peer has been deleted.
network-peer-updatedThe network peer has been updated.
network-renamedThe network device has been renamed.old_name: the previous name.
network-updatedThe network device’s configuration has changed.
network-zone-createdA new network zone has been created.
network-zone-deletedThe network zone has been deleted.
network-zone-record-createdA new network zone record has been created.
network-zone-record-deletedThe network zone record has been deleted.
network-zone-record-updatedThe network zone record has been updated.
network-zone-updatedThe network zone has been updated.
operation-cancelledThe operation has been canceled.
profile-createdA new profile has been created.
profile-deletedThe profile has been deleted.
profile-renamedThe profile has been renamed .old_name: the previous name.
profile-updatedThe profile’s configuration has changed.
project-createdA new project has been created.
project-deletedThe project has been deleted.
project-renamedThe project has been renamed.old_name: the previous name.
project-updatedThe project’s configuration has changed.
storage-pool-createdA new storage pool has been created.target: cluster member name.
storage-pool-deletedThe storage pool has been deleted.
storage-pool-updatedThe storage pool’s configuration has changed.target: cluster member name.
storage-volume-backup-createdA new backup for the storage volume has been created.type: container, virtual-machine, image, or custom.
storage-volume-backup-deletedThe storage volume’s backup has been deleted.
storage-volume-backup-renamedThe storage volume’s backup has been renamed.old_name: the previous name.
storage-volume-backup-retrievedThe storage volume’s backup has been downloaded.
storage-volume-createdA new storage volume has been created.type: container, virtual-machine, image, or custom.
storage-volume-deletedThe storage volume has been deleted.
storage-volume-renamedThe storage volume has been renamed.old_name: the previous name.
storage-volume-restoredThe storage volume has been restored from a snapshot.snapshot: name of the snapshot being restored.
storage-volume-snapshot-createdA new storage volume snapshot has been created.type: container, virtual-machine, image, or custom.
storage-volume-snapshot-deletedThe storage volume’s snapshot has been deleted.
storage-volume-snapshot-renamedThe storage volume’s snapshot has been renamed.old_name: the previous name.
storage-volume-snapshot-updatedThe configuration for the storage volume’s snapshot has changed.
storage-volume-updatedThe storage volume’s configuration has changed.
warning-acknowledgedThe warning’s status has been set to “acknowledged”.
warning-deletedThe warning has been deleted.
warning-resetThe warning’s status has been set to “new”.