VMSS与服务结构群集自动缩放

时间:2016-09-10 19:40:52

标签: azure scaling autoscaling azure-autoscaling-block

我想在服务架构应用程序中扩展或扩展。为此,我在VM规模集上添加了具有CPU指标的自动调节设置。在VM规模集中,我有扩展部分,其中wadcfg部分具有CPU指标计数器。并且数据已成功发送到我指定的存储帐户。但是,使用VMSS和服务结构群集无法完成向外扩展或扩展。我遇到了在天蓝色门户网站中指定的问题。https://azure.microsoft.com/en-us/documentation/articles/virtual-machine-scale-sets-troubleshoot/

如果没有服务结构,相同的CPU指标工作正常,VM规模设置正逐渐缩小。

也检查了订阅限制。但无法找到问题。但是,我们收到一封邮件通知说,当vmss和服务结构一起部署时,无法读取自动缩放的诊断数据。

1 个答案:

答案 0 :(得分:4)

Service Fabric确实支持AutoScale,但它没有很好的记录。这是一个基本文档 - https://azure.microsoft.com/en-us/documentation/articles/service-fabric-cluster-scale-up-down/,它使用“XmlCfg”元素来配置计数器。但是有一种方法可以通过JSON来实现,它更具可读性。以下是“IaaSDiagnostics”扩展程序中“设置”块的摘录。

请注意“DiagnosticMonitorConfiguration”下包含“PerformanceCounters”和“Metrics”元素。

{
  "name": "Windows_VMDiagnosticsVmExt",
  "properties": {
    "type": "IaaSDiagnostics",
    "autoUpgradeMinorVersion": true,
    "protectedSettings": {
      "storageAccountName": "[variables('applicationDiagnosticsStorageAccountName')]",
      "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('applicationDiagnosticsStorageAccountName')),'2016-01-01').keys[0].value]",
      "storageAccountEndPoint": "https://core.windows.net/"
    },
    "publisher": "Microsoft.Azure.Diagnostics",
    "settings": {
      "WadCfg": {
        "DiagnosticMonitorConfiguration": {
          "overallQuotaInMB": "50000",
          "PerformanceCounters": {
            "PerformanceCounterConfiguration": [
              {
                "annotation": [],
                "scheduledTransferPeriod": "PT1M",
                "counterSpecifier": "\\Processor(_Total)\\% Processor Time",
                "sampleRate": "PT1M"
              },
              {
                "annotation": [],
                "scheduledTransferPeriod": "PT1M",
                "counterSpecifier": "\\Memory\\% Committed Bytes in Use",
                "sampleRate": "PT1M"
              }
            ]
          },
          "Metrics": {
            "resourceId": "[resourceId('Microsoft.Compute/virtualMachineScaleSets', variables('defaultVMNodeTypeName'))]",
            "MetricAggregation": [
              { "scheduledTransferPeriod": "PT1H" },
              { "scheduledTransferPeriod": "PT1M" }
            ]
          },
          "EtwProviders": {
            "EtwEventSourceProviderConfiguration": [
              {
                "provider": "Microsoft-ServiceFabric-Actors",
                "scheduledTransferKeywordFilter": "1",
                "scheduledTransferPeriod": "PT5M",
                "DefaultEvents": {
                  "eventDestination": "ServiceFabricReliableActorEventTable"
                }
              },
              {
                "provider": "Microsoft-ServiceFabric-Services",
                "scheduledTransferPeriod": "PT5M",
                "DefaultEvents": {
                  "eventDestination": "ServiceFabricReliableServiceEventTable"
                }
              }
            ],
            "EtwManifestProviderConfiguration": [
              {
                "provider": "cbd93bc2-71e5-4566-b3a7-595d8eeca6e8",
                "scheduledTransferLogLevelFilter": "Information",
                "scheduledTransferKeywordFilter": "4611686018427387904",
                "scheduledTransferPeriod": "PT5M",
                "DefaultEvents": {
                  "eventDestination": "ServiceFabricSystemEventTable"
                }
              }
            ]
          }
        }
      },
      "StorageAccount": "[variables('applicationDiagnosticsStorageAccountName')]"
    },
    "typeHandlerVersion": "1.5"
  }
}