- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试通过 terraform 添加 LinuxDiagnostic 扩展。
虚拟机是:
azure_image_publisher = "Redhat"
azure_image_offer = "RHEL"
azure_image_sku = "7.8"
我的部署如下所示:
resource "azurerm_virtual_machine_extension" "diagnostics_linux" {
count = local.is_windows == true ? 0 : 1
name = "LinuxDiagnostic"
virtual_machine_id = azurerm_virtual_machine.main.id
publisher = "Microsoft.Azure.Diagnostics"
type = "LinuxDiagnostic"
type_handler_version = "3.0"
auto_upgrade_minor_version = "true"
settings = <<SETTINGS
{
"storageAccount": "${var.stackSettings.azurerm_storage_account.name}",
"ladCfg": {
"diagnosticMonitorConfiguration": {
"eventVolume": "Medium",
"metrics": {
"metricAggregation": [
{
"scheduledTransferPeriod": "PT1M"
},
{
"scheduledTransferPeriod": "PT1H"
}
],
"resourceId": "/subscriptions/${var.stackSettings.azure_subscription_id}/resourceGroups/${var.stackSettings.azurerm_resource_group}/providers/Microsoft.Compute/virtualMachines/${azurerm_virtual_machine.main.id}"
},
"syslogEvents": { /** list of syslogs **/},
"performanceCounters": {/** list of perf counters **/}
},
"sampleRateInSeconds": 15
}
}
SETTINGS
protected_settings = <<SETTINGS
{
"storageAccountName": "${var.stackSettings.azurerm_storage_account.name}",
"storageAccountKey": "${var.stackSettings.azurerm_storage_account.primary_access_key}",
"storageAccountEndPoint": "https://core.windows.net"
}
SETTINGS
depends_on = [azurerm_virtual_machine.main]
}
每次我尝试通过 terraform 申请时,都会收到错误:
Error: 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 "
on ..\..\..\..\modules\Azure-Server\v1\main.tf line 284, in resource "azurerm_virtual_machine_extension" "diagnostics_linux":
284: resource "azurerm_virtual_machine_extension" "diagnostics_linux" {
我的 Windows 诊断扩展工作正常,我通过门户直接从工作部署中获取了 JSON。
寻求帮助以了解我可能缺少的内容。或者如果有人有 XML LAD 版本,我也会尝试一下(在任何地方都找不到)。
谢谢!
编辑
完整的工作解决方案(包括获取讨厌的 SAS token 并从 json 文件读取而不是巨大的 terrform block !)地形配置:
/**
Linux Diagnostic Agent
The linux diagnostic agent is rather complicated to get working.
You need:
1. A static timestamp for start/expiry time
2. A SAS token from the storage account with custom permissions
3. Importing multiple large jsons with custom cleanup
This is taken care of for everything below
**/
//== Provider used to store timestamp SAS token lifetime ==//
provider "time" {
version = "~> 0.4"
}
//== Store 10 years in the future ==//
resource "time_offset" "linux_oms_sas_expiry" {
count = local.is_windows == true ? 0 : 1
offset_years = 10
}
//== Store (now - 10) days to ensure we have valid SAS ==//
resource "time_offset" "linux_oms_sas_start" {
count = local.is_windows == true ? 0 : 1
offset_days = -10
}
//== SAS Token required for Diagnostic Extension ==//
/**
The permissions are based on the linux powershell sas creation here: https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/diagnostics-linux
**/
data "azurerm_storage_account_sas" "linux_oms" {
count = local.is_windows == true ? 0 : 1
connection_string = var.stackSettings.azurerm_storage_account.primary_connection_string
https_only = true
resource_types {
service = true
container = true
object = true
}
services {
blob = true
table = true
queue = false
file = false
}
start = time_offset.linux_oms_sas_start[0].rfc3339
expiry = time_offset.linux_oms_sas_expiry[0].rfc3339
permissions {
read = true
write = true
delete = true
list = true
add = true
create = true
update = true
process = true
}
}
//=== Install Diagnostic Extension ===//
resource "azurerm_virtual_machine_extension" "diagnostics_linux" {
count = local.is_windows == true ? 0 : 1
name = "LinuxDiagnostic"
virtual_machine_id = azurerm_virtual_machine.main.id
publisher = "Microsoft.Azure.Diagnostics"
type = "LinuxDiagnostic"
type_handler_version = "3.0"
auto_upgrade_minor_version = "true"
settings = <<SETTINGS
{
"StorageAccount": "${var.stackSettings.azurerm_storage_account.name}",
"ladCfg": {
"diagnosticMonitorConfiguration": {
"eventVolume": "Medium",
"metrics": {
"metricAggregation": [
{
"scheduledTransferPeriod": "PT1H"
},
{
"scheduledTransferPeriod": "PT1M"
}
],
"resourceId": "${azurerm_virtual_machine.main.id}"
},
"performanceCounters": ${file("${path.module}/azure_jsons/azure_extension_diagnostics_linux_performancecounters.json")},
"syslogEvents": ${file("${path.module}/azure_jsons/azure_extension_diagnostics_linux_syslogevents.json")}
},
"sampleRateInSeconds": 15
}
}
SETTINGS
protected_settings = <<SETTINGS
{
"storageAccountName": "${var.stackSettings.azurerm_storage_account.name}",
"storageAccountSasToken": "${data.azurerm_storage_account_sas.linux_oms[0].sas}",
"storageAccountEndPoint": "https://core.windows.net",
"sinksConfig": {
"sink": [
{
"name": "SyslogJsonBlob",
"type": "JsonBlob"
},
{
"name": "LinuxCpuJsonBlob",
"type": "JsonBlob"
}
]
}
}
SETTINGS
depends_on = [azurerm_virtual_machine.main]
}
azure_extension_diagnostics_linux_performancecounters.json:
{
"performanceCounterConfiguration": [
{
"annotation": [
{
"displayName": "Disk read guest OS",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "readbytespersecond",
"counterSpecifier": "/builtin/disk/readbytespersecond",
"type": "builtin",
"unit": "BytesPerSecond"
},
{
"annotation": [
{
"displayName": "Disk writes",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "writespersecond",
"counterSpecifier": "/builtin/disk/writespersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Disk transfer time",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "averagetransfertime",
"counterSpecifier": "/builtin/disk/averagetransfertime",
"type": "builtin",
"unit": "Seconds"
},
{
"annotation": [
{
"displayName": "Disk transfers",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "transferspersecond",
"counterSpecifier": "/builtin/disk/transferspersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Disk write guest OS",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "writebytespersecond",
"counterSpecifier": "/builtin/disk/writebytespersecond",
"type": "builtin",
"unit": "BytesPerSecond"
},
{
"annotation": [
{
"displayName": "Disk read time",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "averagereadtime",
"counterSpecifier": "/builtin/disk/averagereadtime",
"type": "builtin",
"unit": "Seconds"
},
{
"annotation": [
{
"displayName": "Disk write time",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "averagewritetime",
"counterSpecifier": "/builtin/disk/averagewritetime",
"type": "builtin",
"unit": "Seconds"
},
{
"annotation": [
{
"displayName": "Disk total bytes",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "bytespersecond",
"counterSpecifier": "/builtin/disk/bytespersecond",
"type": "builtin",
"unit": "BytesPerSecond"
},
{
"annotation": [
{
"displayName": "Disk reads",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "readspersecond",
"counterSpecifier": "/builtin/disk/readspersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Disk queue length",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "averagediskqueuelength",
"counterSpecifier": "/builtin/disk/averagediskqueuelength",
"type": "builtin",
"unit": "Count"
},
{
"annotation": [
{
"displayName": "Network in guest OS",
"locale": "en-us"
}
],
"class": "network",
"counter": "bytesreceived",
"counterSpecifier": "/builtin/network/bytesreceived",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Network total bytes",
"locale": "en-us"
}
],
"class": "network",
"counter": "bytestotal",
"counterSpecifier": "/builtin/network/bytestotal",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Network out guest OS",
"locale": "en-us"
}
],
"class": "network",
"counter": "bytestransmitted",
"counterSpecifier": "/builtin/network/bytestransmitted",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Network collisions",
"locale": "en-us"
}
],
"class": "network",
"counter": "totalcollisions",
"counterSpecifier": "/builtin/network/totalcollisions",
"type": "builtin",
"unit": "Count"
},
{
"annotation": [
{
"displayName": "Packets received errors",
"locale": "en-us"
}
],
"class": "network",
"counter": "totalrxerrors",
"counterSpecifier": "/builtin/network/totalrxerrors",
"type": "builtin",
"unit": "Count"
},
{
"annotation": [
{
"displayName": "Packets sent",
"locale": "en-us"
}
],
"class": "network",
"counter": "packetstransmitted",
"counterSpecifier": "/builtin/network/packetstransmitted",
"type": "builtin",
"unit": "Count"
},
{
"annotation": [
{
"displayName": "Packets received",
"locale": "en-us"
}
],
"class": "network",
"counter": "packetsreceived",
"counterSpecifier": "/builtin/network/packetsreceived",
"type": "builtin",
"unit": "Count"
},
{
"annotation": [
{
"displayName": "Packets sent errors",
"locale": "en-us"
}
],
"class": "network",
"counter": "totaltxerrors",
"counterSpecifier": "/builtin/network/totaltxerrors",
"type": "builtin",
"unit": "Count"
},
{
"annotation": [
{
"displayName": "Filesystem transfers/sec",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "IsAggregate=TRUE",
"counter": "transferspersecond",
"counterSpecifier": "/builtin/filesystem/transferspersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"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"
},
{
"annotation": [
{
"displayName": "Filesystem bytes/sec",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "IsAggregate=TRUE",
"counter": "bytespersecond",
"counterSpecifier": "/builtin/filesystem/bytespersecond",
"type": "builtin",
"unit": "BytesPerSecond"
},
{
"annotation": [
{
"displayName": "Filesystem reads/sec",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "IsAggregate=TRUE",
"counter": "readspersecond",
"counterSpecifier": "/builtin/filesystem/readspersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Filesystem write bytes/sec",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "IsAggregate=TRUE",
"counter": "byteswrittenpersecond",
"counterSpecifier": "/builtin/filesystem/byteswrittenpersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Filesystem writes/sec",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "IsAggregate=TRUE",
"counter": "writespersecond",
"counterSpecifier": "/builtin/filesystem/writespersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Filesystem % used inodes",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "IsAggregate=TRUE",
"counter": "percentusedinodes",
"counterSpecifier": "/builtin/filesystem/percentusedinodes",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU IO wait time",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentiowaittime",
"counterSpecifier": "/builtin/processor/percentiowaittime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU user time",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentusertime",
"counterSpecifier": "/builtin/processor/percentusertime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU nice time",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentnicetime",
"counterSpecifier": "/builtin/processor/percentnicetime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU percentage guest OS",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentprocessortime",
"counterSpecifier": "/builtin/processor/percentprocessortime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU interrupt time",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentinterrupttime",
"counterSpecifier": "/builtin/processor/percentinterrupttime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU idle time",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentidletime",
"counterSpecifier": "/builtin/processor/percentidletime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU privileged time",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentprivilegedtime",
"counterSpecifier": "/builtin/processor/percentprivilegedtime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "Memory available",
"locale": "en-us"
}
],
"class": "memory",
"counter": "availablememory",
"counterSpecifier": "/builtin/memory/availablememory",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Swap percent used",
"locale": "en-us"
}
],
"class": "memory",
"counter": "percentusedswap",
"counterSpecifier": "/builtin/memory/percentusedswap",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "Memory used",
"locale": "en-us"
}
],
"class": "memory",
"counter": "usedmemory",
"counterSpecifier": "/builtin/memory/usedmemory",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Page reads",
"locale": "en-us"
}
],
"class": "memory",
"counter": "pagesreadpersec",
"counterSpecifier": "/builtin/memory/pagesreadpersec",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Swap available",
"locale": "en-us"
}
],
"class": "memory",
"counter": "availableswap",
"counterSpecifier": "/builtin/memory/availableswap",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Swap percent available",
"locale": "en-us"
}
],
"class": "memory",
"counter": "percentavailableswap",
"counterSpecifier": "/builtin/memory/percentavailableswap",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "Mem. percent available",
"locale": "en-us"
}
],
"class": "memory",
"counter": "percentavailablememory",
"counterSpecifier": "/builtin/memory/percentavailablememory",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "Pages",
"locale": "en-us"
}
],
"class": "memory",
"counter": "pagespersec",
"counterSpecifier": "/builtin/memory/pagespersec",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Swap used",
"locale": "en-us"
}
],
"class": "memory",
"counter": "usedswap",
"counterSpecifier": "/builtin/memory/usedswap",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Memory percentage",
"locale": "en-us"
}
],
"class": "memory",
"counter": "percentusedmemory",
"counterSpecifier": "/builtin/memory/percentusedmemory",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "Page writes",
"locale": "en-us"
}
],
"class": "memory",
"counter": "pageswrittenpersec",
"counterSpecifier": "/builtin/memory/pageswrittenpersec",
"type": "builtin",
"unit": "CountPerSecond"
}
]
}
azure_extension_diagnostics_linux_syslogevents.json
{
"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"
}
}
编辑2
如果需要,可以使用模块: https://github.com/elongstreet88/terraform-linuxdiagnostic-agent-module
最佳答案
正如上面指出的,您需要为存储帐户添加 SAS token ,使用 terraform 输出此存储帐户 SAS token ,然后以这种方式将其输入到 protected 设置中(我将复制我的完整配置来帮助...... ):
resource "azurerm_virtual_machine_extension" "nva1_diag_setting" {
name = "${var.current-name-convention-core-module}-nva1-ub16-LinuxDiagnostics"
virtual_machine_id = "${azurerm_virtual_machine.nva1-ub16.id}"
publisher = "Microsoft.Azure.Diagnostics"
type = "LinuxDiagnostic"
type_handler_version = "3.0"
auto_upgrade_minor_version = "true"
settings = <<SETTINGS
{
"StorageAccount": "${var.stor-log-repo-name}",
"ladCfg": {
"diagnosticMonitorConfiguration": {
"eventVolume": "Medium",
"metrics": {
"metricAggregation": [
{
"scheduledTransferPeriod": "PT1H"
},
{
"scheduledTransferPeriod": "PT1M"
}
],
"resourceId": "${azurerm_virtual_machine.nva1-ub16.id}"
},
"performanceCounters": {
"performanceCounterConfiguration": [
{
"annotation": [
{
"displayName": "Disk read guest OS",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "readbytespersecond",
"counterSpecifier": "/builtin/disk/readbytespersecond",
"type": "builtin",
"unit": "BytesPerSecond"
},
{
"annotation": [
{
"displayName": "Disk writes",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "writespersecond",
"counterSpecifier": "/builtin/disk/writespersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Disk transfer time",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "averagetransfertime",
"counterSpecifier": "/builtin/disk/averagetransfertime",
"type": "builtin",
"unit": "Seconds"
},
{
"annotation": [
{
"displayName": "Disk transfers",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "transferspersecond",
"counterSpecifier": "/builtin/disk/transferspersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Disk write guest OS",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "writebytespersecond",
"counterSpecifier": "/builtin/disk/writebytespersecond",
"type": "builtin",
"unit": "BytesPerSecond"
},
{
"annotation": [
{
"displayName": "Disk read time",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "averagereadtime",
"counterSpecifier": "/builtin/disk/averagereadtime",
"type": "builtin",
"unit": "Seconds"
},
{
"annotation": [
{
"displayName": "Disk write time",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "averagewritetime",
"counterSpecifier": "/builtin/disk/averagewritetime",
"type": "builtin",
"unit": "Seconds"
},
{
"annotation": [
{
"displayName": "Disk total bytes",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "bytespersecond",
"counterSpecifier": "/builtin/disk/bytespersecond",
"type": "builtin",
"unit": "BytesPerSecond"
},
{
"annotation": [
{
"displayName": "Disk reads",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "readspersecond",
"counterSpecifier": "/builtin/disk/readspersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Disk queue length",
"locale": "en-us"
}
],
"class": "disk",
"condition": "IsAggregate=TRUE",
"counter": "averagediskqueuelength",
"counterSpecifier": "/builtin/disk/averagediskqueuelength",
"type": "builtin",
"unit": "Count"
},
{
"annotation": [
{
"displayName": "Network in guest OS",
"locale": "en-us"
}
],
"class": "network",
"counter": "bytesreceived",
"counterSpecifier": "/builtin/network/bytesreceived",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Network total bytes",
"locale": "en-us"
}
],
"class": "network",
"counter": "bytestotal",
"counterSpecifier": "/builtin/network/bytestotal",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Network out guest OS",
"locale": "en-us"
}
],
"class": "network",
"counter": "bytestransmitted",
"counterSpecifier": "/builtin/network/bytestransmitted",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Network collisions",
"locale": "en-us"
}
],
"class": "network",
"counter": "totalcollisions",
"counterSpecifier": "/builtin/network/totalcollisions",
"type": "builtin",
"unit": "Count"
},
{
"annotation": [
{
"displayName": "Packets received errors",
"locale": "en-us"
}
],
"class": "network",
"counter": "totalrxerrors",
"counterSpecifier": "/builtin/network/totalrxerrors",
"type": "builtin",
"unit": "Count"
},
{
"annotation": [
{
"displayName": "Packets sent",
"locale": "en-us"
}
],
"class": "network",
"counter": "packetstransmitted",
"counterSpecifier": "/builtin/network/packetstransmitted",
"type": "builtin",
"unit": "Count"
},
{
"annotation": [
{
"displayName": "Packets received",
"locale": "en-us"
}
],
"class": "network",
"counter": "packetsreceived",
"counterSpecifier": "/builtin/network/packetsreceived",
"type": "builtin",
"unit": "Count"
},
{
"annotation": [
{
"displayName": "Packets sent errors",
"locale": "en-us"
}
],
"class": "network",
"counter": "totaltxerrors",
"counterSpecifier": "/builtin/network/totaltxerrors",
"type": "builtin",
"unit": "Count"
},
{
"annotation": [
{
"displayName": "Filesystem transfers/sec",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "IsAggregate=TRUE",
"counter": "transferspersecond",
"counterSpecifier": "/builtin/filesystem/transferspersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"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"
},
{
"annotation": [
{
"displayName": "Filesystem bytes/sec",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "IsAggregate=TRUE",
"counter": "bytespersecond",
"counterSpecifier": "/builtin/filesystem/bytespersecond",
"type": "builtin",
"unit": "BytesPerSecond"
},
{
"annotation": [
{
"displayName": "Filesystem reads/sec",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "IsAggregate=TRUE",
"counter": "readspersecond",
"counterSpecifier": "/builtin/filesystem/readspersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Filesystem write bytes/sec",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "IsAggregate=TRUE",
"counter": "byteswrittenpersecond",
"counterSpecifier": "/builtin/filesystem/byteswrittenpersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Filesystem writes/sec",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "IsAggregate=TRUE",
"counter": "writespersecond",
"counterSpecifier": "/builtin/filesystem/writespersecond",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Filesystem % used inodes",
"locale": "en-us"
}
],
"class": "filesystem",
"condition": "IsAggregate=TRUE",
"counter": "percentusedinodes",
"counterSpecifier": "/builtin/filesystem/percentusedinodes",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU IO wait time",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentiowaittime",
"counterSpecifier": "/builtin/processor/percentiowaittime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU user time",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentusertime",
"counterSpecifier": "/builtin/processor/percentusertime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU nice time",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentnicetime",
"counterSpecifier": "/builtin/processor/percentnicetime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU percentage guest OS",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentprocessortime",
"counterSpecifier": "/builtin/processor/percentprocessortime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU interrupt time",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentinterrupttime",
"counterSpecifier": "/builtin/processor/percentinterrupttime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU idle time",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentidletime",
"counterSpecifier": "/builtin/processor/percentidletime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "CPU privileged time",
"locale": "en-us"
}
],
"class": "processor",
"condition": "IsAggregate=TRUE",
"counter": "percentprivilegedtime",
"counterSpecifier": "/builtin/processor/percentprivilegedtime",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "Memory available",
"locale": "en-us"
}
],
"class": "memory",
"counter": "availablememory",
"counterSpecifier": "/builtin/memory/availablememory",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Swap percent used",
"locale": "en-us"
}
],
"class": "memory",
"counter": "percentusedswap",
"counterSpecifier": "/builtin/memory/percentusedswap",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "Memory used",
"locale": "en-us"
}
],
"class": "memory",
"counter": "usedmemory",
"counterSpecifier": "/builtin/memory/usedmemory",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Page reads",
"locale": "en-us"
}
],
"class": "memory",
"counter": "pagesreadpersec",
"counterSpecifier": "/builtin/memory/pagesreadpersec",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Swap available",
"locale": "en-us"
}
],
"class": "memory",
"counter": "availableswap",
"counterSpecifier": "/builtin/memory/availableswap",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Swap percent available",
"locale": "en-us"
}
],
"class": "memory",
"counter": "percentavailableswap",
"counterSpecifier": "/builtin/memory/percentavailableswap",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "Mem. percent available",
"locale": "en-us"
}
],
"class": "memory",
"counter": "percentavailablememory",
"counterSpecifier": "/builtin/memory/percentavailablememory",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "Pages",
"locale": "en-us"
}
],
"class": "memory",
"counter": "pagespersec",
"counterSpecifier": "/builtin/memory/pagespersec",
"type": "builtin",
"unit": "CountPerSecond"
},
{
"annotation": [
{
"displayName": "Swap used",
"locale": "en-us"
}
],
"class": "memory",
"counter": "usedswap",
"counterSpecifier": "/builtin/memory/usedswap",
"type": "builtin",
"unit": "Bytes"
},
{
"annotation": [
{
"displayName": "Memory percentage",
"locale": "en-us"
}
],
"class": "memory",
"counter": "percentusedmemory",
"counterSpecifier": "/builtin/memory/percentusedmemory",
"type": "builtin",
"unit": "Percent"
},
{
"annotation": [
{
"displayName": "Page writes",
"locale": "en-us"
}
],
"class": "memory",
"counter": "pageswrittenpersec",
"counterSpecifier": "/builtin/memory/pageswrittenpersec",
"type": "builtin",
"unit": "CountPerSecond"
}
]
},
"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
}
}
SETTINGS
protected_settings = <<PROTECTED_SETTINGS
{
"storageAccountName": "${var.stor-log-repo-name}",
"storageAccountSasToken": "${var.stor-log-repo-sas}",
"sinksConfig":
{
"sink": [
{
"name": "SyslogJsonBlob",
"type": "JsonBlob"
},
{
"name": "LinuxCpuJsonBlob",
"type": "JsonBlob"
}
]
}
}
PROTECTED_SETTINGS
}
然后您的存储帐户中将拥有此类数据:
正如我们所说,Terraform 还不支持 Azure EVent hub 的 SAS token (目前仅适用于 azure 存储),因此我们不能使用 terraform 来做到这一点,我打开了 github issue ,让我们看看是否要添加此内容。
关于azure - 尝试通过 terraform 添加 LinuxDiagnostic Azure VM 扩展并收到错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61959617/
我是 magento 的新手,目前我在 magento 安装期间遇到“必须加载 PHP 扩展 curl ”错误。你能帮帮我吗? 最佳答案 如果您的服务器上没有安装 curl,您可以键入以下命令之一来安
我在 macOS Mojave/macOS Big Sur/macOS Monterey/macOS Ventura 上使用最新的 php 版本 7.2 并收到类似错误 $composer requ
这个问题已经有答案了: Why generic type is not applicable for argument extends super class for both? (5 个回答) 已关
我正在使用 NightWatch.js 并进行一些 UI 测试,我想用一些额外的 desiredCapabilities 启动默认浏览器实例(即启用扩展并应用一些特定值)。 p> 注意:我可以执行这些
有人知道为什么我在 java 8 中使用此代码时没有服务器扩展名称吗: try { URL url = new URL(urlString); URLC
扩展提供给我的类(class)。为现有的类提供新功能。或扩展现有的mixin s 或虚拟类,任何东西都可以工作。 也许是这样的: class FlatButton {} // maybe no
我有一个关于使用 c 代码和 mod_wsgi 扩展 python 的问题。 我在 apache 服务器中有一个 django 应用程序,它查询 postgresql 数据库以生成报告。在某些报告中,
testcafe支持在Chrome浏览器中加载crx扩展吗? 如果是这样,请告诉我需要尝试什么方法。 我尝试了下面的代码,但没有成功 await t.eval(new Function(fs.read
这个问题已经有答案了: What is a raw type and why shouldn't we use it? (16 个回答) 已关闭 3 年前。 有什么区别: // 1 class A c
我正在编写一个 chrome 扩展来记录单击开始按钮后触发的请求。 这是我的文件:1. list .json { "manifest_version": 2, "name": "recorde
扩展是将较短的文本,例如一组提示或主题列表,输入到大型语言模型中,让模型生成更长的文本。我们可以利用这个特性让大语言模型生成基于某个主题的电子邮件或小论文。通过这种方式使用大语言模型,可以为工作与生活
我每天都在使用 vim 和 perforce 现在我的问题是,如果我想查看 perforce 文件修订版,则从命令模式下的 vim :!p4 打印文件#1 vim 试图让我获得缓冲区 #1。有没有办法
大家好,我有一个关于 NUnit 扩展(2.5.10)的问题。 我想做的是向 数据库。为此,我使用 Event 创建了 NUnit 扩展 听众。 我遇到的问题是公共(public)无效 TestFin
我有弹出窗口,而不是模态窗口。 如何通过单击页面的其他部分(不在窗口中)来关闭此窗口? 最佳答案 像这样的东西: function closeWin(e, t) { var el = win.
我通常非常谨慎地使用扩展方法。当我确实觉得有必要编写一个扩展方法时,有时我想重载该方法。我的问题是,您对调用其他扩展方法的扩展方法有何看法?不好的做法?感觉不对,但我无法真正定义原因。 例如,第二个
扩展 Ant Ant带有一组预定义的任务,但是你可以创建自己的任务,如下面的例子所示。 定制Ant 任务应扩展 org.apache.tools.ant.Task 类,同时也应该拓展 execut
我想要一个重定向所有请求的扩展: http://website.com/foo.js 到: http://localhost/myfoo.js 我无法使用主机文件将主机从 website.com 编辑
对于为什么 QChartView 放在 QTabWidget 中时会扩展,我有点迷惑。 这是 QChartView 未展开(因为它被隐藏)时应用程序的图片。 应用程序的黑色部分是 QOpenGLWid
如果在连接条件中使用 OR 运算符,如何优化以下查询以避免 SQL 调优方面的 OR 扩展? SELECT t1.A, t2.B, t1.C, t1.D, t2.E FROM t1 LEFT J
一旦加载插件的问题得到解决(在 .NET 中通过 MEF 的情况下),下一步要解决的是与它们的通信。简单的方法是实现一个接口(interface),使用插件实现,但有时插件只需要扩展应用程序的工作方式
我是一名优秀的程序员,十分优秀!