Skip to main content

Audit log commands

This section covers commands that you use in SMCTL to manage logs. Use flags to specify command parameters.

Command

To view log commands, run:

smctl logs --help

or

smctl logs -h

Subcommand

List logs command begins with:

smctl logs list

or

smctl logs ls

Flags

The list log command supports these flags:

Tabela 1. Flags for managing logs

Shortcut

Flags

Description

--dynamic-key-id string

Dynamic key ID for searching. (Signature logs only). 

Format:

--dynamic-key-id="<value>"

--page int

Page number. Default is 1.

--period string

Time period options: all, today, week, or month. Default is “all”. 

Format:

--period="<value>"

--release-id string

Signature logs only. 

Format:

--release-id="<value>"

--size int

Page size. Default is “100”.

--status string

Log status options: all, success, or failed. Default is “all”. 

Format:

--status="<value>"

--type string

Log type options: signature or audit. Default is “signature”. 

Format:

--type="<value>"

--account-id string

Account ID for the user. 

Format:

--account-id="<value>"

-h

--help

Help for listing logs.


Examples

Description: List all signature logs for the provided release window ID.

Command:

smctl logs ls --release-id=<release ID>

Command sample:

smctl logs list --release-id=06324b6e-81a0-4e12-a856-378bef246fd2

Description: List all successful audit logs for the last week.

Command:

smctl logs ls --status=<all, success, or failed> --period=<all, today, week, or month> --type=<signature or audit>

Command sample:

smctl logs ls --status=success --period=week --type=audit

Description: List successful signature logs for today.

Command:

smctl logs ls --status=<all, success, or failed> --period=<all, today, week, or month>

Command sample:

smctl logs ls --status=success --period=today