用于存储指标和日志记录的 Azure 模板
Azure templates for storage metrics and logging
我们的 Azure DevOps 实施部署了一个 ARM 模板并运行了几个 powershell 脚本来完全部署我们的解决方案。目前,它正在使用 Azure Powershell 命令 Set-AzureStorageServiceMetricsProperty 和 Set-AzureStorageServiceLoggingProperty 修改 Azure 存储日志记录和指标属性。
虽然继续使用这些命令是完全可以接受的,但我们正在考虑将等效的 JSON 添加到我们的 ARM 模板中。这可能吗?如果是这样,这是否记录在任何地方?我查看了 Azure 资源管理器模板 reference,但它似乎没有我需要的东西。任何指针甚至示例 JSON 都将受到赞赏。
是的,这是可能的。这是谈论这个的文章:
https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/monitoring-and-diagnostics/monitoring-enable-diagnostic-logs-using-template.md#non-compute-resource-template
ARM Json 无法更改,恕不另行通知(好吧,没有人会亲自警告您,但他们很少有重大更改,我 3 岁的 arm 模板仍然有效)。所以没什么好怕的,真的。
我们的 Azure DevOps 实施部署了一个 ARM 模板并运行了几个 powershell 脚本来完全部署我们的解决方案。目前,它正在使用 Azure Powershell 命令 Set-AzureStorageServiceMetricsProperty 和 Set-AzureStorageServiceLoggingProperty 修改 Azure 存储日志记录和指标属性。
虽然继续使用这些命令是完全可以接受的,但我们正在考虑将等效的 JSON 添加到我们的 ARM 模板中。这可能吗?如果是这样,这是否记录在任何地方?我查看了 Azure 资源管理器模板 reference,但它似乎没有我需要的东西。任何指针甚至示例 JSON 都将受到赞赏。
是的,这是可能的。这是谈论这个的文章:
https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/monitoring-and-diagnostics/monitoring-enable-diagnostic-logs-using-template.md#non-compute-resource-template
ARM Json 无法更改,恕不另行通知(好吧,没有人会亲自警告您,但他们很少有重大更改,我 3 岁的 arm 模板仍然有效)。所以没什么好怕的,真的。