MAQPNADocs

maqpna logs

Print the logs of a session's sandbox

Observe-o json | yaml

Synopsis#

maqpna logs SESSION | sess/NAME | ag/AGENT [-n NS] [-f] [--since 10m] [--tail N] [-c agent|exec|browser|attest] [-p] [--prefix] [--timestamps]

Description#

The pods are found by the operator's maqpna.com/session label. Without -c every container is printed, each line prefixed with [pod/container]. ag/AGENT picks the agent's newest running session (like kubectl logs deploy/NAME). For what the agent did through the gateway (tool and model calls, decisions) use maqpna audit tail --session SESSION. With -o json each line is printed as one JSON object {pod, container, message} per line.

Flags#

FlagTypeDescriptionDefault
-c, --containerstringcontainer: agent, exec, browser, attest, ... (default: every container)none
-f, --followswitchfollow the logsnone
-n, --namespacestringnamespacedefault
-p, --previousswitchthe logs of the previous instance of the container (after a restart)none
--prefixswitchprefix each line with [pod/container] (default on with several containers)none
--sincedurationonly logs newer than this (e.g. 10m)none
--tailintlines of recent log to show (-1: all)-1
--timestampsswitchinclude timestampsnone

The global flags (--context, -o, --no-color, ...) work with every command.

Examples#

maqpna logs fix-test-7k2 -n team-a -f
maqpna logs fix-test-7k2 -n team-a --since 10m --timestamps

What happens when you run it#

  • Prints a table by default; -o json or -o yaml print the data, and --jq EXPR filters the JSON.

Exit codes#

CodeMeaning
0success
1error (the message says what failed, with a hint when there is one)
2usage error: unknown flag, missing argument or bad value; the synopsis is printed
3a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command)

Terminal demo#

maqpna logs --help.cast

This command needs a Kubernetes cluster with MAQPNA installed, so the recording shows its help. Try it against a cluster from Install.

Last updated