Azure-docs: ARM template capability?

Created on 14 Feb 2020  Â·  9Comments  Â·  Source: MicrosoftDocs/azure-docs

Can I provision Linux Diagnostic Extension through ARM? I can find the windows one but couldn't find Linux Diagnostic Extension ARM documentation anywhere


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 assigned-to-author doc-idea triaged virtual-machines-linusvc

Most helpful comment

I ran into the same issue and i have an SR open on it right now. If you delete the extension after the VM is deployed and re-install via azure cli/powershell it works after that. I am hoping support can assist with this as we shouldn't have to do that

All 9 comments

Thanks for the question. We are currently investigating and will update you shortly.

We should be able to do.

Regular extension template can be used. Reference is here. https://docs.microsoft.com/en-us/azure/templates/microsoft.compute/2018-10-01/virtualmachines/extensions

But you need to give lot of parameters in public and protected settings.

Thanks, if you take a look at the reference, what to put in "settings" section is what I am looking for, we can't randomly guess what should be put inside, instead there should be some sort of documentation on it

Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.

I have an ARM template for VM deployments and I was deploying this extension with that template back in 2019. But then it stopped working. I have tried to make it work from time to time since then but it always fail with the following error (deploying ubuntu 18.04):
{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "VMExtensionProvisioningError",
"message": "VM has reported a failure when processing extension 'LinuxDiagnostic'. Error message: \"Extension operation Enable failed:'NoneType' object has no attribute 'get_fluentd_syslog_src_config'\"\r\n\r\nMore information on troubleshooting is available at https://aka.ms/VMExtensionLinuxDiagnosticsTroubleshoot "
}
]
}
}

The extension:
{ "comments": "~~ VM Extension - LinuxDiagnostic ~~", "type": "Microsoft.Compute/virtualMachines/extensions", "apiVersion": "2018-10-01", "name": "[concat(variables('vmNamePrefix'), padLeft(copyindex('extDiagLinuxLoop', 1), 2, '0'), '/LinuxDiagnostic')]", "condition": "[not(variables('isWindowsOS'))]", "tags": "[variables('tagResources')]", "copy": { "name": "extDiagLinuxLoop", "count": "[parameters('numberOfInstances')]" }, "location": "[variables('rgLocation')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', concat(variables('vmNamePrefix'), padLeft(copyindex('extDiagLinuxLoop', 1), 2, '0')))]", "[resourceId('Microsoft.Compute/virtualMachines/extensions', concat(variables('vmNamePrefix'), padLeft(copyindex('extDiagLinuxLoop', 1), 2, '0')), 'MicrosoftMonitoringAgent')]" ], "properties": { "publisher": "Microsoft.Azure.Diagnostics", "type": "LinuxDiagnostic", "typeHandlerVersion": "3.0", "autoUpgradeMinorVersion": true, "settings": { "ladCfg": { "diagnosticMonitorConfiguration": { "syslogEvents": { "syslogEventConfiguration": { "LOG_AUTH": "LOG_DEBUG", "LOG_AUTHPRIV": "LOG_DEBUG", "LOG_CRON": "LOG_DEBUG", "LOG_DAEMON": "LOG_DEBUG", "LOG_FTP": "LOG_DEBUG", "LOG_KERN": "LOG_DEBUG", "LOG_LOCAL0": "LOG_DEBUG", "LOG_LOCAL1": "LOG_DEBUG", "LOG_LOCAL2": "LOG_DEBUG", "LOG_LOCAL3": "LOG_DEBUG", "LOG_LOCAL4": "LOG_DEBUG", "LOG_LOCAL5": "LOG_DEBUG", "LOG_LOCAL6": "LOG_DEBUG", "LOG_LOCAL7": "LOG_DEBUG", "LOG_LPR": "LOG_DEBUG", "LOG_MAIL": "LOG_DEBUG", "LOG_NEWS": "LOG_DEBUG", "LOG_SYSLOG": "LOG_DEBUG", "LOG_USER": "LOG_DEBUG", "LOG_UUCP": "LOG_DEBUG" } }, "sampleRateInSeconds": 15, "eventVolume": "Medium", "metrics": { "resourceId": "[resourceId('Microsoft.Compute/virtualMachines', concat(variables('vmNamePrefix'), padLeft(copyindex('extDiagLinuxLoop', 1), 2, '0')))]", "metricAggregation": [ { "scheduledTransferPeriod": "PT1H" }, { "scheduledTransferPeriod": "PT1M" } ] }, "performanceCounters": { "performanceCounterConfiguration": [ { "annotation": [ { "displayName": "Filesystem % free space", "locale": "en-us" } ], "class": "filesystem", "condition": "IsAggregate=TRUE", "counter": "percentfreespace", "counterSpecifier": "/builtin/filesystem/percentfreespace", "type": "builtin", "unit": "Percent" }, { "annotation": [ { "displayName": "Filesystem % used space", "locale": "en-us" } ], "class": "filesystem", "condition": "IsAggregate=TRUE", "counter": "percentusedspace", "counterSpecifier": "/builtin/filesystem/percentusedspace", "type": "builtin", "unit": "Percent" }, { "annotation": [ { "displayName": "Filesystem used space", "locale": "en-us" } ], "class": "filesystem", "condition": "IsAggregate=TRUE", "counter": "usedspace", "counterSpecifier": "/builtin/filesystem/usedspace", "type": "builtin", "unit": "Bytes" }, { "annotation": [ { "displayName": "Filesystem read bytes/sec", "locale": "en-us" } ], "class": "filesystem", "condition": "IsAggregate=TRUE", "counter": "bytesreadpersecond", "counterSpecifier": "/builtin/filesystem/bytesreadpersecond", "type": "builtin", "unit": "CountPerSecond" }, { "annotation": [ { "displayName": "Filesystem free space", "locale": "en-us" } ], "class": "filesystem", "condition": "IsAggregate=TRUE", "counter": "freespace", "counterSpecifier": "/builtin/filesystem/freespace", "type": "builtin", "unit": "Bytes" }, { "annotation": [ { "displayName": "Filesystem % free inodes", "locale": "en-us" } ], "class": "filesystem", "condition": "IsAggregate=TRUE", "counter": "percentfreeinodes", "counterSpecifier": "/builtin/filesystem/percentfreeinodes", "type": "builtin", "unit": "Percent" } ] } } }, "StorageAccount": "[variables('vmDiagStorageAccountName')]" }, "protectedSettings": { "storageAccountName": "[variables('vmDiagStorageAccountName')]", "storageAccountSasToken": "[listAccountSas(variables('vmDiagStorageAccountName'), '2019-06-01', variables('accountSasProperties'))]", "storageAccountEndPoint": "https://core.windows.net/" } } }

I ran into the same issue and i have an SR open on it right now. If you delete the extension after the VM is deployed and re-install via azure cli/powershell it works after that. I am hoping support can assist with this as we shouldn't have to do that

Hello - Has this issue been fixed? I am running into it as well. I understand that we can enable in other ways but we would like to deploy via ARM template

I was able to get this working by moving the listAccountSas function to the parameters as a securestring parameter section and passing in a single variable for the protectedSettings.StorageAccountSasToken - I would guess the python script running the diagnostics part on the VM cant properly assemble the accountSasProperties for some reason

We are currently cleaning up old issues and closing out items that are greater than 90 days old. If an issue is still present, please open a new feedback item on the document so we can prioritize correctly.

please-close

Was this page helpful?
0 / 5 - 0 ratings

Related issues

behnam89 picture behnam89  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

Ponant picture Ponant  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments