Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:audit

Audit log: tail, show one event, verify the hash chains, list the channels.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/audit.md

On this page

exp:audit

Audit log: tail, show one event, verify the hash chains, list the channels.

Script bin/php/audit.php, code in kernel/private/classes/commands/audit.php. Run it from the installation root, as the user the web server runs as:

./console exp:audit --help
php bin/php/audit.php --help

Help text

Audit log: the records of the audit channels and their hash chains

  exp:audit status|channels
  exp:audit tail [--channel=<c>] [--name=<pattern>] [--lines=20] [--follow] [--json]
  exp:audit show <event id> [--json]
  exp:audit search [filters] [--files] [--limit=50] [--json]
  exp:audit verify [--channel=<c>] [--date=YYYY-MM-DD] [--archives] [--json]
  exp:audit rotate [--channel=<c>] [--apply]
  exp:audit archive [--channel=<c>] [--before=YYYY-MM-DD] [--format=gzip|bzip2|xz|zstd|zip] [--apply]
  exp:audit restore --channel=<c> --date=YYYY-MM-DD [--to=<dir>] [--apply]
  exp:audit purge [--channel=<c>] [--apply]
  exp:audit reindex [--incremental] [--archives] [--channel=<c>] [--apply]
  exp:audit pseudonymise [--apply]
  exp:audit export [filters] [--subject-user=<id>] [--format=jsonl|csv|bundle] --out=<path>
  exp:audit import [--dir=<old log dir>] [--file=login.log] [--keep-originals] [--apply]
  exp:audit key list|rotate [--apply]|fingerprint [--pseudonym]
  exp:audit checkpoint [--apply]
  exp:audit sinks list|test <name>|flush [<name>] [--apply]
  exp:audit alerts list|test <rule> [--replay=YYYY-MM-DD]|recipients [--rule=<rule>]
  exp:audit cron [--daily] [--apply]  one run of the cronjob part (--daily: the daily tasks now)

The manage actions (rotate, archive, restore, purge, reindex, pseudonymise, import, key rotate,
checkpoint, sinks flush, cron) only say what they would do unless --apply is given. --dry-run means
the same as no --apply; --apply together with --dry-run is a usage error (exit 2).

Filters (search, export): --name=<pattern> --user=<id> --login= --object=<type:id> --target=<type:id>
  --result=success|refused|failed --severity=<min> --request= --job= --run= --ip=<network>
  --from=YYYY-MM-DD[THH:MM[:SS]][Z|+HH:MM] --to=... (UTC unless an offset is given; --to includes that day,
  minute or second) --query=<text> --legacy-file=<4.x file name> --channel=
Name patterns: * | <domain>.* | a prefix ending in .* (access.session.*) | a whole name; anything else
  is refused (exit 2).

Options

OptionValueHelp
--channelrequiredOnly this channel (content, access, system, commerce, read)
--namerequiredtail, search, export: only names matching this pattern: , access., access.session.*, content.node.move
--linesrequiredtail: how many records (default 20)
--followtail: keep printing new records as they are written (Ctrl-C ends)
--jsonPrint records and results as JSON
--daterequiredverify: only that day's files; restore: the archived day (YYYY-MM-DD, UTC)
--archivesverify: also the archives (manifests, HMAC, checksums, the chain through them); reindex: also the archives
--applyrotate, archive, restore, purge, reindex, pseudonymise, import, key rotate, checkpoint, sinks flush, cron: do it (the default is a dry run)
--dry-runThe default, kept for scripts that pass it: only say what would be done
--beforerequiredarchive: the days before this date (default: older than LiveDays)
--formatrequiredarchive: the format handler; export: jsonl, csv or bundle
--torequiredrestore: the directory (default <LogDir>/restored); search, export: up to and including this time (as --from)
--incrementalreindex: only what is new (default: rebuild)
--userrequired
--loginrequired
--objectrequired
--targetrequired
--resultrequired
--severityrequired
--requestrequired
--jobrequired
--runrequired
--iprequired
--fromrequiredsearch, export: from this time (YYYY-MM-DD[THH:MM[:SS]], UTC unless it ends in Z or +HH:MM)
--queryrequiredsearch, export: full-text search over names, object names and before/after values
--legacy-filerequired
--limitrequiredsearch: how many records (default 50); export: at most MaxExportRecords
--filessearch: read the files, not the index
--outrequiredexport: the file (jsonl, csv) or directory (bundle)
--subject-userrequiredexport: every record by or about this user id (an access request)
--dirrequiredimport: the directory of the 4.x audit files (default: the audit LogDir)
--filerequiredimport: only this 4.x file (login.log)
--keep-originalsimport: leave the 4.x files in place after archiving them
--pseudonymkey rotate: replace the pseudonym key instead of the signing key
--replayrequiredalerts test: run the rule over the records since this date, without firing
--dailycron: run the daily tasks now
--rulerequiredalerts recipients: only this rule

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).

Arguments: [action][id][extra].


Generated by ./console exp:help:examples from bin/php/audit.php, kernel/private/classes/commands/audit.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x