我正在尝试为连接到 VM 的各个磁盘启用 Linux 诊断。我指的是这个链接(https://docs.microsoft.com/en-us/azure/virtual-machines/linux/diagnostic-extension)
我正在使用这个 CLI
azure vm extension set vmturbo DiagnosticTest LinuxDiagnostic Microsoft.Azure.Diagnostics '3.0' --private-config-path PrivateConfig.json --public-config-path PublicConfig.json -v
这就是 PrivateConfig.json 的样子
{
"storageAccountName" : “XXXXXXXXXX”,
"storageAccountSasToken": "sv=2016-05-31&ss=bfqt&srt=sco&sp=rwdlacup&se=2017-06-13T19:34:34Z&st=2017-06-13T11:34:34Z&spr=https,http&sig=G%2FXj0rYHNk7jUx6CF47kPdJh42jhafSsUvT0JlrR3XE%3D"
}
And this is how PublicConfig.json looks like
{
"StorageAccount": "diagnosticvmstorage",
"sampleRateInSeconds": 15,
"ladCfg": {
"diagnosticMonitorConfiguration": {
"performanceCounters": {
"sinks": "",
"performanceCounterConfiguration": [
{
{
"annotation": [
{
"displayName": "Disk write time",
"locale": "en-us"
}
],
"class": "disk",
"condition": "Name=\"/dev/sdc1\"",
"counter": "averagewritetime",
"counterSpecifier": "/builtin/disk/averagewritetime",
"type": "builtin",
"unit": "Seconds"
},
{
"annotation": [
{
"displayName": "Filesystem transfers/sec",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "Name=\"/newdisk\"",
"counter": "transferspersecond",
"counterSpecifier": "/builtin/filesystem/transferspersecond",
"type": "builtin",
"unit": "CountPerSecond"
}
]
},
"metrics": {
"metricAggregation": [
{
"scheduledTransferPeriod": "PT1H"
},
{
"scheduledTransferPeriod": "PT1M"
}
],
"resourceId": "/subscriptions/758ad253-cbf5-4b18-8863-3eed0825bf07/resourceGroups/vmturbo/providers/Microsoft.Compute/virtualMachines/DiagnosticTest"
},
"eventVolume": "Large"
}
}
]
}
VM 有一个附加到它的磁盘 /dev/sdc1,它安装在 /newdisk。即使在使用了两个 performanceCounters 之后,我仍然在 WADMetrics***** 表中看不到任何数据。有什么我做错了还是我错过了配置文件中的任何内容?
谢谢。