Edit

az aksarc logs

Note

This reference is part of the aksarc extension for the Azure CLI (version 2.32.0 or higher). The extension automatically installs the first time you run an az aksarc logs command. Learn more about extensions.

Command group 'aksarc' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Collects logs from provisioned clusters.

Commands

Name Description Type Status
az aksarc logs hci

Collects logs from provisioned clusters in HCI environment.

Extension Preview

az aksarc logs hci

Preview

Command group 'aksarc logs' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Collects logs from provisioned clusters in HCI environment.

az aksarc logs hci [--credentials-dir]
                   [--ip]
                   [--kubeconfig]
                   [--out-dir]

Examples

Collects logs with IP address and SSH credentials

az aksarc logs hci --ip 192.168.200.31 192.168.200.32 --ssh-key ~/.ssh --out-dir ./logs

Collects logs with kubeconfig and SSH credentials. kubeconfig is only used to collect IP addresses, and `ssh-key` file path is used instead of `directory`.

az aksarc logs hci --kubeconfig ~/.kube/config --ssh-key ~/.ssh/id_rsa --out-dir ./logs

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--credentials-dir --ssh-key

Path to SSH credentials to connect to nodes, either id_rsa file or directory is accepted.

--ip --ips

IP(s) of all the nodes (control plane, etc.) needed to collect logs.

--kubeconfig

Path to kubeconfig file to connect to the cluster.

--out-dir

Output directory to store collected logs. If not specified, logs are stored in the current directory.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.