mc log error

The mc log error command views and manages the recorded error logs on a MinIO AIStor deployment.

mc log error uses singular filter flags

Unlike mc log api and mc log audit, mc log error uses singular filter flags (--node, --bucket, --prefix, --api) and --max-per-node.

The following command shows the error logs recorded in the last 24 hours on the myaistor MinIO AIStor cluster:

mc log error --last 24h myaistor

The command has the following syntax:

mc [GLOBALFLAGS] log error                     \
                 [--last DURATION]             \
                 [--node NODE]                 \
                 [--bucket BUCKET]             \
                 [--prefix PREFIX]             \
                 [--api API]                   \
                 [--stats]                     \
                 [--max-per-node NUMBER]       \
                 [--out FILE | --in FILE]      \
                 [--get-config | --set-config FILE] \
                 [ALIAS]
  • Brackets [] indicate optional parameters.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

Required

The alias of a MinIO AIStor cluster.

ALIAS is optional when you use --in to view a saved file.

--last

Alias: -l

Optional

Show logs for the last duration, for example 5m, 2h, or 1d.

--node

Alias: -n

Optional

Filter logs by node name. Defaults to all, which returns logs from every node.

--bucket

Optional

Filter logs by bucket name.

--prefix

Optional

Filter logs by object prefix.

--api

Optional

Filter logs by API name, for example putobject or getobject.

--stats

Optional

Display error statistics grouped by node and trace origin instead of individual log entries. This option applies when replaying a saved file with --in.

--max-per-node

Optional

The maximum number of log entries to retrieve per node. Defaults to 1000.

--out

Alias: -o

Optional

Save the logs to a compressed (.zst) file instead of printing them. View the saved file later with --in.

--in

Optional

View logs from a previously saved file instead of querying the deployment. Filter flags apply to the saved file when replaying.

--get-config

Optional

Export the current error log recorder configuration to YAML on standard output. Redirect to a file to edit it, for example mc log error --get-config ALIAS > error-config.yaml.

The error recorder configuration includes the enable, driveLimit, flushCount, and flushInterval keys.

--set-config

Optional

Apply an error log recorder configuration from a YAML file to the deployment.

Global flags

This command supports any of the global flags.

Examples

Show recent error logs

mc log error --last 24h myaistor

Show error statistics from a saved file

mc log error --out error-logs.zst myaistor
mc log error --in error-logs.zst --stats

Filter by node

mc log error --node node-1 myaistor

Export and re-apply the recorder configuration

mc log error --get-config myaistor > error-config.yaml
mc log error --set-config error-config.yaml myaistor

On this page