【问题标题】:wanna enable audit diagnostics settings of aks node resource group resources NSG and virtual machine scale set using ARM template想要使用 ARM 模板启用 aks 节点资源组资源 NSG 和虚拟机规模集的审核诊断设置
【发布时间】:2022-01-12 09:57:58
【问题描述】:

我能够使用 arm(在 arm 内的 sn-p 下方)启用 aks 的审核诊断设置,但同样的方式在节点资源组中的所有资源(如网络安全组和虚拟机规模集)中启用了相同的设置。

"resources": [
    {
      "condition": "[parameters('audit_enable')]",
      "type": "Microsoft.ContainerService/managedClusters/providers/diagnosticSettings",
      "apiVersion": "2021-05-01-preview",
      "name": "[clustername]",
      "dependsOn": [
        "[resourceId('Microsoft.ContainerService/managedClusters', clutername)]"
      ],
      "properties": {
        "storageAccountId": "[variables('storageAccountId')]",
        "logs": [
          {
            "categoryGroup": "allLogs",
            "enabled": true,
            "retentionPolicy": {
              "days": 30,
              "enabled": true
            }
          }
        ],
        "metrics": [
          {
            "category": "AllMetrics",
            "enabled": true,
            "retentionPolicy": {
              "days": 30,
              "enabled": true
            }
          }
        ]
      }
    }
  ]

【问题讨论】:

    标签: azure azure-resource-manager azure-aks


    【解决方案1】:

    以下陈述基于我们的观察和 Azure 文档。我们通过创建虚拟机规模集在本地环境中进行了测试,并尝试为其启用诊断设置不幸的是,我们没有虚拟机规模集的诊断设置功能。

    这是输出截图供参考:

    根据Azure documentation,Azure 诊断代理仅适用于虚拟机。

    Azure 诊断extension 从 Azure 虚拟机和其他计算资源的来宾操作系统和工作负载收集监控数据。它主要将数据收集到 Azure 存储中,但也允许您定义数据接收器以将数据发送到其他目的地,例如 Azure Monitor Metrics 和 Azure Event Hubs。

    这里是使用arm template为虚拟机创建诊断设置的参考文档。

    我们尝试搜索示例 arm 模板以创建网络安全组的诊断设置,遗憾的是我们没有找到任何建议您查看 basic arm template to create the diagnostic settings 的此文档并根据您的要求进行更改。

    您还可以参考ARM templates samples 了解 Azure 监视器中的诊断设置。

    【讨论】:

      猜你喜欢
      • 2021-02-15
      • 1970-01-01
      • 2020-02-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多