az vmss diagnostics

Configure the Azure Virtual Machine Scale Set diagnostics extension.

Commands

az vmss diagnostics get-default-config Show the default config file which defines data to be collected.
az vmss diagnostics set Enable diagnostics on a VMSS.

az vmss diagnostics get-default-config

Show the default config file which defines data to be collected.

az vmss diagnostics get-default-config [--is-windows-os]
[--subscription]

Optional Parameters

--is-windows-os

For Windows VMs.

--subscription

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

az vmss diagnostics set

Enable diagnostics on a VMSS.

az vmss diagnostics set --resource-group
--settings
--vmss-name
[--no-auto-upgrade {false, true}]
[--protected-settings]
[--subscription]
[--version]

Examples

Enable diagnostics on a VMSS. (autogenerated)

az vmss diagnostics set --protected-settings {protected-settings} --resource-group MyResourceGroup --settings '{"commandToExecute": "echo testing"}' --vmss-name MyVmss

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--settings

Json string or a file path, which defines data to be collected.

--vmss-name

Scale set name.

Optional Parameters

--no-auto-upgrade

If set, the extension service will not automatically pick or upgrade to the latest minor version, even if the extension is redeployed.

accepted values: false, true
--protected-settings

Json string or a file path containing private configurations such as storage account keys, etc.

--subscription

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

--version

Version of the diagnostics extension. Will use the latest if not specfied.