Share via


az batch node service-logs

Manage the service log files of a Batch compute node.

Commands

Name Description Type Status
az batch node service-logs upload

Upload Azure Batch service log files from the specified Compute Node to Azure Blob Storage.

Core GA

az batch node service-logs upload

Upload Azure Batch service log files from the specified Compute Node to Azure Blob Storage.

This is for gathering Azure Batch service log files in an automated fashion from Compute Nodes if you are experiencing an error and wish to escalate to Azure support. The Azure Batch service log files should be shared with Azure support to aid in debugging issues with the Batch service.

az batch node service-logs upload --node-id
                                  --pool-id
                                  [--account-endpoint]
                                  [--account-key]
                                  [--account-name]
                                  [--container-url]
                                  [--end-time]
                                  [--json-file]
                                  [--resource-id]
                                  [--start-time]

Required Parameters

--node-id

The ID of the Compute Node from which you want to upload the Azure Batch service log files.

--pool-id

The ID of the Pool that contains the Compute Node.

Optional Parameters

--account-endpoint

Batch service endpoint. Alternatively, set by environment variable: AZURE_BATCH_ENDPOINT.

--account-key

Batch account key. Alternatively, set by environment variable: AZURE_BATCH_ACCESS_KEY.

--account-name

Batch account name. Alternatively, set by environment variable: AZURE_BATCH_ACCOUNT.

--container-url

Required. If a user assigned managed identity is not being used, the URL must include a Shared Access Signature (SAS) granting write permissions to the container. The SAS duration must allow enough time for the upload to finish. The start time for SAS is optional and recommended to not be specified.

--end-time

Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. If omitted, the default is to upload all logs available after the startTime. Expected format is an ISO-8601 timestamp.

--json-file

A file containing the upload batch service logs configuration specification in JSON (formatted to match the respective REST API body). If this parameter is specified, all 'Upload Batch Service Logs Configuration Arguments' are ignored.

--resource-id

The ARM resource id of the user assigned identity.

--start-time

Required. Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. Expected format is an ISO-8601 timestamp.

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.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.