Event logs (snap/3.1/CLI)

2.9 3.0 3.1
DEB CLI ~ UI CLI ~ UI CLI ~ UI
SNAP CLI ~ UI CLI ~ UI CLI ~ UI

The events log tracks state changes and the execution of basic configuration steps, serving as a timeline for your MAAS machines. A simple view of the events log might look something like this:

  Time 	                        Event
  Sun, 04 Oct. 2020 23:12:35 	Ready
  Sun, 04 Oct. 2020 23:12:31 	Running test - smartctl-validate on sda
  Sun, 04 Oct. 2020 23:10:37 	Gathering information
  Sun, 04 Oct. 2020 23:10:30 	Loading ephemeral
  Sun, 04 Oct. 2020 23:10:15 	Performing PXE boot
  Sun, 04 Oct. 2020 23:09:54 	Powering on
  Sun, 04 Oct. 2020 23:09:53 	Commissioning

To view the raw Events log, enter the following command:

maas $PROFILE events query

You can tabulate the results, sorted by machine, with the following command:

maas admin events query | jq -r '(["HOSTNAME","TIMESTAMP","TYPE","DESCRIPTION"] | (., map(length*"-"))),
(.events[] | [.hostname, .created, .type, .description // "-"]) | @tsv' | column -t -s $'\t'

Here we could add some more information and examples that would describe typical usages of this:

  • what kind of things are available here?
  • some more examples, including checking event log for a given machine
  • showing events that happened or were initiated by a particular username
  • the output record format and what each field is