Skip to content

Audit Logging

grlx records every significant action performed through the farmer in an append-only audit log. Each entry captures who did what, when, on which target, and whether it succeeded.

  • Recipe executions (cook)
  • Command dispatch (cmd.run)
  • SSH sessions
  • Key accept and reject operations
  • Configuration changes

Each entry includes:

FieldDescription
TimestampWhen the action occurred
UsernameThe authenticated user who acted
ActionThe type of operation
TargetThe sprout or cohort affected
ResultSuccess or failure with detail

Audit logs are stored as JSONL (one JSON object per line) in the farmer’s data directory, partitioned by date. This makes them easy to process with standard tools like jq, grep, or any log aggregation system.

Terminal window
grlx audit dates

Shows all dates that have audit log entries, along with entry counts and file sizes.

Terminal window
# All entries for today
grlx audit list
# Filter by date
grlx audit list --date 2026-03-15
# Filter by action type
grlx audit list --action cook
# Filter by user
grlx audit list --pubkey UABC...XYZ
# Show only failures
grlx audit list --failed
# Limit results
grlx audit list --limit 50
Terminal window
grlx audit list --out json

The audit log is also available through the farmer’s API at GET /api/v1/audit, supporting the same query parameters as the CLI. This endpoint requires at least view permission.