Service Fabric Performance Counters in Application Insights - azure

I'm trying to send performance data (i.e. CPU and Memory Usage) from my service fabric nodes to Azure Application Insights. However they do not seem to be appearing in my application insights metrics explorer.
The performance counters are successfully sent to to an azure storage table (WADPerformanceCountersTable) but are not propagated onto application insights for analysis.
Here is the WAD Config part of my resource file which is used to deploy my service fabric application:
"WadCfg": {
"DiagnosticMonitorConfiguration": {
"overallQuotaInMB": "50000",
"sinks": "applicationInsights",
"DiagnosticInfrastructureLogs": {},
"PerformanceCounters": {
"PerformanceCounterConfiguration": [
{
"counterSpecifier": "\\Processor(_Total)\\% Processor Time",
"sampleRate": "PT3M",
"sinks": "applicationInsights"
},
{
"counterSpecifier": "\\Memory\\Available MBytes",
"sampleRate": "PT3M",
"sinks": "applicationInsights"
}
]
},
"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"
}
}
]
}
},
"SinksConfig": {
"Sink": [
{
"name": "applicationInsights",
"ApplicationInsights": "c0c27fcd-21e8-4a11-8502-ed250d22e124"
}
]
}
},
"StorageAccount": "sfdgbriansftest7053"
Is there anything I am missing from this deployment file to successfully receive these performance counters? Am I missing any other required steps?
Thanks.

I have this working in my cluster. I am sending CPU usage to application insights. Please see the json below. The only difference I can see is that you are not specifying the "units" and the "scheduledTransferPeriod".
"publisher": "Microsoft.Azure.Diagnostics",
"settings": {
"WadCfg": {
"DiagnosticMonitorConfiguration": {
"overallQuotaInMB": "50000",
"sinks": "applicationInsights",
"PerformanceCounters": {
"scheduledTransferPeriod": "PT1M",
"PerformanceCounterConfiguration": [
{
"counterSpecifier": "\\Processor(_Total)\\% Processor Time",
"sampleRate": "PT15S",
"unit": "Percent",
"annotation": [
],
"sinks": "applicationInsights"
}
]
},

Related

Trying to add LinuxDiagnostic Azure VM Extension through terraform and getting errors

I am trying to get the LinuxDiagnostic extension to add via terraform.
The VM is:
azure_image_publisher = "Redhat"
azure_image_offer = "RHEL"
azure_image_sku = "7.8"
My deploy looks like this:
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]
}
Every time I attempt to apply via terraform I receive the error:
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" {
My windows diagnostic extension works fine and I took the JSON directly from a working deploy through the portal.
Looking for assistance as to what I could be missing.
Or if someone has the XML LAD version, I would try that too (cannot find it anywhere).
Thanks!
EDIT
Full working solution (including getting the pesky SAS Token and reading from json files instead of giant terrform blocks!)
Terraform Config:
/**
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"
}
}
EDIT 2
Ready to go module if needed:
https://github.com/elongstreet88/terraform-linuxdiagnostic-agent-module
AS pointed out above you need to add sas token for storage account, output this storage account SAS token using terraform an then input this in the protected settings that way ( I will copy-past my full config to help.... ) :
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
}
Then you will have this kind of data in your storage account :
As we speak, Terraform does not support SAS token ( yet ) for Azure EVent hub ( only for azure storage for now ) , so we cannot use terraform to do that, I opened a github issue, let's see if this is going to be added.
According to this documentation, you need to specify storageAccountSasToken not storageAccountKey for the Linux Diagnostic Extension.
Your Protected Settings should be like this:
protected_settings = <<PROTECTED_SETTINGS
{
"storageAccountName": "YOUR_ACCOUNT_NAME",
"storageAccountSasToken": "YOUR SAS TOKEN"
}
Hope this helps!

Service Fabric Sample Application missing log messages when deployed to Azure

I'm trying to get the default Service Fabric app logging to work in Azure the same way it does locally.
In Visual Studio 2019 v16.4.5 I created the sample Service Fabric stateless application .Net Core 3.1.
Everything built and runs locally OK.
In the Diagnostics Event window I can see the application log messages "Working-1522" this if from the sample source code:
ServiceEventSource.Current.ServiceMessage(this.Context, "Working-{0}", ++iterations);
But.. When I deploy to Azure it deploys OK and runs OK but I no longer see the "Working-1522" messages in any of the storage WADServiceFabricSystemEventTable or WADServiceFabricReliableServiceEventTable tables.
I don't see the messages anywhere.
I am not using Application Insights. The nodes have the IaaSDiagnostics Microsoft.Azure.Diagnostics Extension, with these Settings:
{
"WadCfg": {
"DiagnosticMonitorConfiguration": {
"overallQuotaInMB": "50000",
"sinks": "applicationInsights",
"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"
}
}
]
}
},
"SinksConfig": {
"Sink": [
{
"name": "applicationInsights",
"ApplicationInsights": ""
}
]
}
},
"StorageAccount": "wad34xxxxxxxxxxx"
}
Any Suggestions?
Did you follow this walkthrough?
You seem to be missing the storage account details:
"type": "IaaSDiagnostics",
"autoUpgradeMinorVersion": true,
"protectedSettings": {
"storageAccountName": "[parameters('applicationDiagnosticsStorageAccountName')]",
"storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]",
"storageAccountEndPoint": "https://core.windows.net/"
},

Azure Resource Manager deployment timeouts

I keep seeing timeouts when using Azure Resource Manager to deploy a Service Fabric Cluster. I see the error below, probably about 20% of the time. Re-deploying the same configuration will fix the problem.
New-AzureRmResourceGroupDeployment : 6:54:02 AM - Resource Microsoft.Compute/virtualMachineScaleSets 'nodeType' failed
with message '{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "VMExtensionHandlerNonTransientError",
"message": "Handler 'Microsoft.Azure.ServiceFabric.ServiceFabricNode' has reported failure for VM Extension
'nodeType_ServiceFabricNode' with terminal error code '1009' and error message: 'Enable failed for plugin (name:
Microsoft.Azure.ServiceFabric.ServiceFabricNode, version 1.0.0.35) with exception Command
C:\\Packages\\Plugins\\Microsoft.Azure.ServiceFabric.ServiceFabricNode\\1.0.0.35\\ServiceFabricExtensionHandler.exe of
Microsoft.Azure.ServiceFabric.ServiceFabricNode has not exited on time! Killing it...'"
}
]
}
}'
At C:\BuildAgent\work\d851d22c9abed7b9\Core\Core\scripts\Provision\ProvisionGeneric.ps1:39 char:1
+ New-AzureRmResourceGroupDeployment -Verbose -ResourceGroupName $resou ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
loymentCmdlet
New-AzureRmResourceGroupDeployment : 6:54:02 AM - Handler 'Microsoft.Azure.ServiceFabric.ServiceFabricNode' has
reported failure for VM Extension 'nodeType_ServiceFabricNode' with terminal error code '1009' and error message: 'Enable
failed for plugin (name: Microsoft.Azure.ServiceFabric.ServiceFabricNode, version 1.0.0.35) with exception Command
C:\Packages\Plugins\Microsoft.Azure.ServiceFabric.ServiceFabricNode\1.0.0.35\ServiceFabricExtensionHandler.exe of
Microsoft.Azure.ServiceFabric.ServiceFabricNode has not exited on time! Killing it...'
At C:\BuildAgent\work\d851d22c9abed7b9\Core\Core\scripts\Provision\ProvisionGeneric.ps1:39 char:1
+ New-AzureRmResourceGroupDeployment -Verbose -ResourceGroupName $resou ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDep
loymentCmdlet
The relevant part of the Azure RM template looks like this:
{
"apiVersion": "[variables('vmssApiVersion')]",
"type": "Microsoft.Compute/virtualMachineScaleSets",
"name": "[parameters('vmNodeType0Name')]",
"location": "[parameters('computeLocation')]",
"dependsOn": ["[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]",
"[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[0])]",
"[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[1])]",
"[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[2])]",
"[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[3])]",
"[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[4])]",
"[concat('Microsoft.Network/loadBalancers/', concat('INT_LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]",
"[concat('Microsoft.Network/loadBalancers/', concat('EXT_LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]",
"[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]",
"[concat('Microsoft.Storage/storageAccounts/', parameters('applicationDiagnosticsStorageAccountName'))]"],
"properties": {
"overprovision": "[parameters('overProvision')]",
"upgradePolicy": {
"mode": "Automatic"
},
"virtualMachineProfile": {
"extensionProfile": {
"extensions": [{
"name": "[concat(parameters('vmNodeType0Name'),'_ServiceFabricNode')]",
"properties": {
"type": "ServiceFabricNode",
"autoUpgradeMinorVersion": false,
"protectedSettings": {
"StorageAccountKey1": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key1]",
"StorageAccountKey2": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key2]"
},
"publisher": "Microsoft.Azure.ServiceFabric",
"settings": {
"clusterEndpoint": "[reference(parameters('clusterName')).clusterEndpoint]",
"nodeTypeRef": "[parameters('vmNodeType0Name')]",
"dataPath": "D:\\\\SvcFab",
"durabilityLevel": "Bronze",
"certificate": {
"thumbprint": "[parameters('clusterSecurityCertThumbprint')]",
"x509StoreName": "my"
}
},
"typeHandlerVersion": "1.0"
}
},
{
"name": "[concat('VMDiagnosticsVmExt','_vmNodeType0Name')]",
"properties": {
"type": "IaaSDiagnostics",
"autoUpgradeMinorVersion": true,
"protectedSettings": {
"storageAccountName": "[parameters('applicationDiagnosticsStorageAccountName')]",
"storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]",
"storageAccountEndPoint": "https://core.windows.net/"
},
"publisher": "Microsoft.Azure.Diagnostics",
"settings": {
"WadCfg": {
"DiagnosticMonitorConfiguration": {
"overallQuotaInMB": "50000",
"sinks": "ApplicationInsights",
"DiagnosticInfrastructureLogs": {
"scheduledTransferLogLevelFilter": "Error"
},
"EtwProviders": {
"EtwEventSourceProviderConfiguration": [{
"provider": "Microsoft-ServiceFabric-Actors",
"scheduledTransferKeywordFilter": "1",
"scheduledTransferPeriod": "PT1M",
"DefaultEvents": {
"eventDestination": "ServiceFabricReliableActorEvents"
}
},
{
"provider": "Microsoft-ServiceFabric-Services",
"scheduledTransferPeriod": "PT1M",
"DefaultEvents": {
"eventDestination": "ServiceFabricReliableServiceEvents"
}
}],
"EtwManifestProviderConfiguration": [{
"provider": "cbd93bc2-71e5-4566-b3a7-595d8eeca6e8",
"scheduledTransferLogLevelFilter": "Information",
"scheduledTransferKeywordFilter": "4611686018427387904",
"scheduledTransferPeriod": "PT1M",
"DefaultEvents": {
"eventDestination": "ServiceFabricSystemEventTable"
}
}]
}
},
"SinksConfig": {
"Sink": [{
"name": "ApplicationInsights",
"ApplicationInsights": "[parameters('appInsightsKey')]",
"Channels": {
"Channel": [{
"logLevel": "Error",
"name": "Errors"
},
{
"logLevel": "Verbose",
"name": "AppLogs"
}]
}
}]
}
},
"StorageAccount": "[parameters('applicationDiagnosticsStorageAccountName')]"
},
"typeHandlerVersion": "1.5"
}
}]
},
"networkProfile": {
"networkInterfaceConfigurations": [{
"name": "[concat(parameters('nicName'), '-0')]",
"properties": {
"ipConfigurations": [{
"name": "[concat(parameters('nicName'),'-',0)]",
"properties": {
"loadBalancerBackendAddressPools": [{
"id": "[variables('lbIntPoolId')]"
},
{
"id": "[variables('lbExtPoolId')]"
}],
"subnet": {
"id": "[variables('subnet0Ref')]"
}
}
}],
"primary": true
}
}]
},
"osProfile": {
"adminPassword": "[parameters('adminPassword')]",
"adminUsername": "[parameters('adminUsername')]",
"computernamePrefix": "[parameters('vmNodeType0Name')]",
"secrets": [{
"sourceVault": {
"id": "[parameters('keyVaultName')]"
},
"vaultCertificates": [{
"certificateStore": "my",
"certificateUrl": "[parameters('encyphermentCertId')]"
},
{
"certificateStore": "my",
"certificateUrl": "[parameters('identityServerSigningCertId')]"
},
{
"certificateStore": "my",
"certificateUrl": "[parameters('clusterSecurityCertId')]"
},
{
"certificateStore": "My",
"certificateUrl": "[parameters('adminCertId')]"
},
{
"certificateStore": "CertificateAuthority",
"certificateUrl": "[parameters('clusterSecurityCertId')]"
}]
}]
},
"storageProfile": {
"imageReference": {
"publisher": "[parameters('vmImagePublisher')]",
"offer": "[parameters('vmImageOffer')]",
"sku": "[parameters('vmImageSku')]",
"version": "[parameters('vmImageVersion')]"
},
"osDisk": {
"vhdContainers": ["[concat('https://', variables('uniqueStringArray0')[0], '.blob.core.windows.net/', parameters('vmStorageAccountContainerName'))]",
"[concat('https://', variables('uniqueStringArray0')[1], '.blob.core.windows.net/', parameters('vmStorageAccountContainerName'))]",
"[concat('https://', variables('uniqueStringArray0')[2], '.blob.core.windows.net/', parameters('vmStorageAccountContainerName'))]",
"[concat('https://', variables('uniqueStringArray0')[3], '.blob.core.windows.net/', parameters('vmStorageAccountContainerName'))]",
"[concat('https://', variables('uniqueStringArray0')[4], '.blob.core.windows.net/', parameters('vmStorageAccountContainerName'))]"],
"name": "vmssosdisk",
"caching": "ReadOnly",
"createOption": "FromImage"
}
}
}
},
"sku": {
"name": "[parameters('vmNodeType0Size')]",
"capacity": "[parameters('vmNodeType0Count')]",
"tier": "Standard"
},
"tags": {
"resourceType": "Service Fabric",
"clusterName": "[parameters('clusterName')]"
}
},
It seems to happen more in the morning than any other time. It's causing our CI build to fail on a regular basis. How can I diagnose this problem? If it's just something we should expect, then what is the best way to capture the error to force a re-deploy?
If you're not changing anything between deployments it's not likely anything you're doing wrong... Open a support request in the Azure portal and give them one of your correlationIds from the failed deployments (more if you have 'em).

VMSS with service fabric cluster autoscale

I want to scale out or scale in the service fabric application. For this I have added the autoscalesettings with CPU metric on VM scale set. And in VM scale set, I have the extension section with wadcfg section with counter on CPU metric. And the data is successfully getting emitted to storage account which I have specified.But scale out or scale on options are not getting done with VMSS and service fabric cluster. I have gone through trouble shooting steps which were specified in azure portal.https://azure.microsoft.com/en-us/documentation/articles/virtual-machine-scale-sets-troubleshoot/
And without service fabric, the same CPU metric is working fine and VM scale set is getting scale out.
Checked subscription limit as well. But could not able to find the issue. But, we are getting a mail notification saying, could not able to read the diagnostics data for autoscale when vmss and service fabric together deployed.
Service Fabric does support AutoScale it's just not very well documented. Here is a basic documentation - https://azure.microsoft.com/en-us/documentation/articles/service-fabric-cluster-scale-up-down/ which uses "XmlCfg" element to configure counters. However there is a way to do it via JSON as well which is more readable. Here is a snippet of a "settings" block from "IaaSDiagnostics" extension.
Note the inclusion of "PerformanceCounters" and "Metrics" elements under "DiagnosticMonitorConfiguration".
{
"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"
}
}

VMSS extensions in linked ARM template

I have a scale set with 5 extensions. 2 of them are for Service Profiler, to install .net 4.6.1, and for the service profiler agent itself. When I deploy the template with all 5 extensions, due (I think..) to the .net installation requiring a restart of the vm, the template will always result in a status of failed. However, it doesn't seem to have actually failed, as when the vm restarts, it resumes any extensions that haven't finished (again, I think.. Unfortunately, my project isn't in the position to be able to test this infrastructure with an application atm).
So, I have attempted to move the 2 service profiler extensions to a linked template, so the status of the scale set will go to succeeded, and actions after this won't be impacted. (As well as other resources in the template being dependent on the scale set, I assume application deployment from VSTS release manager won't happen if the infrastructure deployment 'failed'.)
So my linked template simply has the scale set resource, but with only the extensions defined:
"resources": [
{
"apiVersion": "2016-03-30",
"type": "Microsoft.Compute/virtualMachineScaleSets",
"name": "[variables('vmNodeType0Name')]",
"location": "[resourceGroup().location]",
"properties": {
"virtualMachineProfile": {
"extensionProfile": {
"extensions": [
{
"properties": {
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.7",
"autoUpgradeMinorVersion": false,
"settings": {
"fileUris": [ "https://serviceprofiler.azurewebsites.net/content/downloads/InstallNetFx46.ps1" ],
"commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted -File InstallNetFx46.ps1"
},
"forceUpdateTag": "RerunExtension"
},
"name": "CustomScriptExtensionInstallNet46"
},
{
"properties": {
"publisher": "Microsoft.VisualStudio.ServiceProfiler",
"type": "ServiceProfilerAgent",
"typeHandlerVersion": "0.1",
"autoUpgradeMinorVersion": true,
"settings": {
"config": {
"ServiceName": "<nameChanged>",
"CircularEtlBufferMB": 200,
"MonitorSamplingRate": 1.0,
"ProfileSamplingRate": 0.05,
"AgentLogFilter": "Warning",
"ProvideUsageTelemetryData": true,
"EtwMetrics": [
{
"ProviderName": "Microsoft-ServiceFabric-Actors",
"ProviderKeywords": 2,
"ProviderLevel": "Verbose",
"Event": "ActorMethod/Start",
"EventStop": "ActorMethod/Stop",
"Name": "methodName"
},
{
"ProviderName": "Microsoft-ServiceFabric-Actors",
"ProviderKeywords": 4,
"ProviderLevel": "Verbose",
"Event": "ActorSaveState/Start",
"EventStop": "ActorSaveState/Stop",
"Name": "actorType"
},
{
"ProviderName": "<nameChanged>",
"ProviderKeywords": 0,
"ProviderLevel": "Informational",
"Event": "Request/Start",
"EventStop": "Request/Stop",
"Name": "url"
}
],
"Tags": [
{
"Type": "Performance",
"Settings": {
"SampleIntervalInSeconds": "5",
"SamplesToConsider": "6",
"Triggers": [
{
"Name": "High CPU",
"Description": "High CPU usage",
"PerfCounter": "Processor Information\\% Processor Time\\_Total",
"Operator": ">",
"Metric": "70"
},
{
"Name": "Busy Disk",
"Description": "High disk usage",
"PerfCounter": "PhysicalDisk\\% Disk Time\\_Total",
"Operator": ">",
"Metric": "10"
},
{
"Name": "Memory Pressure",
"Description": "High memory usage",
"PerfCounter": "Memory\\Available MBytes",
"Operator": "<",
"Metric": "400"
},
{
"Name": "High GC",
"Description": "High GC time",
"PerfCounter": ".NET CLR Memory\\% Time in GC\\_Global_",
"Operator": ">",
"Metric": "10"
}
]
}
},
{
"Type": "Version",
"Settings": {
"Source": {
"Type": "ServiceFabric"
}
}
}
]
}
},
"protectedSettings": {
"storageAccountName": "[variables('applicationDiagnosticsStorageAccountName')]",
"storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]",
"storageAccountEndPoint": "https://core.windows.net/"
}
},
"name": "ServiceProfilerAgent"
}
]
}
}
}
However, I get this error message:
"message": "{\r\n \"error\": {\r\n \"code\": \"OperationNotAllowed\",\r\n \"message\": \"VM Scale Set extensions of handler 'Microsoft.Azure.ServiceFabric.ServiceFabricNode' can be deleted only at the time of VM Scale Set deletion.\"\r\n }\r\n}"
},
Seems kind of strange considering I'm not trying to delete anything. And ofc there is literally nothing, as far as I can tell, in the documentation about extensions in linked templates, or anywhere else...
Is this even supported? Or should I just leave it in 1 template?
Any help would be great!
the error message about deleting extensions is because the extension list is applied as a whole, so if you don't have the two original extensions (from the main template) it will think you are deleting them. I.e. you'd need to include all 4 extensions in the list.
The suggestion in the comments of using a custom image with .Net installed is a good one. Another option for getting information on to the machine is to use the customData property - though it probably won't help this specific case.
There are some requests to create a platform image with latest .Net installed (I'm wondering whether any of the marketplace images already have this), and I think we should do it.
Here is my full scale set resource, with all extensions in the single template. It originally didn't work, but it does now...
{
"apiVersion": "[variables('vmssApiVersion')]",
"type": "Microsoft.Compute/virtualMachineScaleSets",
"name": "[parameters('vmNodeType0Name')]",
"location": "[variables('computeLocation')]",
"tags": {
"resourceType": "node",
"environmentName": "[parameters('prefix')]",
"displayName": "[parameters('vmNodeType0DisplayName')]"
},
"dependsOn": [
"storageLoop",
"[variables('lbID0')]",
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
"[concat('Microsoft.Storage/storageAccounts/', variables('supportLogStorageAccountName'))]",
"[concat('Microsoft.Storage/storageAccounts/', variables('applicationDiagnosticsStorageAccountName'))]",
"[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'))]",
"[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'),'/Modules/',variables('dscModules').xNetworking.ModuleName)]",
"[concat('Microsoft.Automation/automationAccounts/', parameters('automationAccountName'),'/Configurations/', parameters('configurationName'))]"
],
"properties": {
"overprovision": "[parameters('overProvision')]",
"upgradePolicy": {
"mode": "Automatic"
},
"virtualMachineProfile": {
"extensionProfile": {
"extensions": [
{
"properties": {
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.7",
"autoUpgradeMinorVersion": false,
"settings": {
"fileUris": [ "https://serviceprofiler.azurewebsites.net/content/downloads/InstallNetFx46.ps1" ],
"commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted -File InstallNetFx46.ps1"
},
"forceUpdateTag": "RerunExtension"
},
"name": "CustomScriptExtensionInstallNet46"
},
{
"properties": {
"publisher": "Microsoft.VisualStudio.ServiceProfiler",
"type": "ServiceProfilerAgent",
"typeHandlerVersion": "0.1",
"autoUpgradeMinorVersion": true,
"settings": {
"config": {
"ServiceName": "<nameChanged>",
"CircularEtlBufferMB": 200,
"MonitorSamplingRate": 1.0,
"ProfileSamplingRate": 0.05,
"AgentLogFilter": "Warning",
"ProvideUsageTelemetryData": true,
"EtwMetrics": [
{
"ProviderName": "Microsoft-ServiceFabric-Actors",
"ProviderKeywords": 2,
"ProviderLevel": "Verbose",
"Event": "ActorMethod/Start",
"EventStop": "ActorMethod/Stop",
"Name": "methodName"
},
{
"ProviderName": "Microsoft-ServiceFabric-Actors",
"ProviderKeywords": 4,
"ProviderLevel": "Verbose",
"Event": "ActorSaveState/Start",
"EventStop": "ActorSaveState/Stop",
"Name": "actorType"
},
{
"ProviderName": "<nameChanged>",
"ProviderKeywords": 0,
"ProviderLevel": "Informational",
"Event": "Request/Start",
"EventStop": "Request/Stop",
"Name": "url"
}
],
"Tags": [
{
"Type": "Performance",
"Settings": {
"SampleIntervalInSeconds": "5",
"SamplesToConsider": "6",
"Triggers": [
{
"Name": "High CPU",
"Description": "High CPU usage",
"PerfCounter": "Processor Information\\% Processor Time\\_Total",
"Operator": ">",
"Metric": "70"
},
{
"Name": "Busy Disk",
"Description": "High disk usage",
"PerfCounter": "PhysicalDisk\\% Disk Time\\_Total",
"Operator": ">",
"Metric": "10"
},
{
"Name": "Memory Pressure",
"Description": "High memory usage",
"PerfCounter": "Memory\\Available MBytes",
"Operator": "<",
"Metric": "400"
},
{
"Name": "High GC",
"Description": "High GC time",
"PerfCounter": ".NET CLR Memory\\% Time in GC\\_Global_",
"Operator": ">",
"Metric": "10"
}
]
}
},
{
"Type": "Version",
"Settings": {
"Source": {
"Type": "ServiceFabric"
}
}
}
]
}
},
"protectedSettings": {
"storageAccountName": "[variables('applicationDiagnosticsStorageAccountName')]",
"storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]",
"storageAccountEndPoint": "https://core.windows.net/"
}
},
"name": "ServiceProfilerAgent"
},
{
"name": "[concat(parameters('vmNodeType0Name'),'_ServiceFabricNode')]",
"properties": {
"type": "ServiceFabricNode",
"autoUpgradeMinorVersion": false,
"protectedSettings": {
"StorageAccountKey1": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('supportLogStorageAccountName')),'2015-05-01-preview').key1]",
"StorageAccountKey2": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('supportLogStorageAccountName')),'2015-05-01-preview').key2]"
},
"publisher": "Microsoft.Azure.ServiceFabric",
"settings": {
"clusterEndpoint": "[reference(parameters('clusterName')).clusterEndpoint]",
"nodeTypeRef": "[parameters('vmNodeType0Name')]",
"dataPath": "D:\\\\SvcFab",
"durabilityLevel": "Bronze",
"certificate": {
"thumbprint": "[parameters('certificateThumbprint')]",
"x509StoreName": "[parameters('certificateStoreValue')]"
}
},
"typeHandlerVersion": "1.0"
}
},
{
"name": "[concat('VMDiagnosticsVmExt','_vmNodeType0Name')]",
"properties": {
"type": "IaaSDiagnostics",
"autoUpgradeMinorVersion": true,
"protectedSettings": {
"storageAccountName": "[variables('applicationDiagnosticsStorageAccountName')]",
"storageAccountKey": "[listkeys(variables('accountid'), '2015-05-01-preview').key1]",
"storageAccountEndPoint": "https://core.windows.net/"
},
"publisher": "Microsoft.Azure.Diagnostics",
"settings": {
"WadCfg": {
"DiagnosticMonitorConfiguration": {
"overallQuotaInMB": "50000",
"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"
}
},
{
"name": "Microsoft.Powershell.DSC",
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.17",
"autoUpgradeMinorVersion": true,
"protectedSettings": {
"Items": {
"registrationKeyPrivate": "[parameters('registrationKey')]"
}
},
"settings": {
"WmfVersion": "latest",
"ModulesUrl": "https://raw.github.com/Azure/azure-quickstart-templates/master/201-vmss-automation-dsc/UpdateLCMforAAPull.zip",
"SasToken": "[parameters('_artifactsLocationSasToken')]",
"ConfigurationFunction": "UpdateLCMforAAPull.ps1\\ConfigureLCMforAAPull",
"Properties": [
{
"Name": "RegistrationKey",
"Value": {
"UserName": "[parameters('adminUserName')]",
"Password": "PrivateSettingsRef:registrationKeyPrivate"
},
"TypeName": "System.Management.Automation.PSCredential"
},
{
"Name": "RegistrationUrl",
"Value": "[parameters('registrationUrl')]",
"TypeName": "System.String"
},
{
"Name": "NodeConfigurationName",
"Value": "[parameters('nodeConfigurationName')]",
"TypeName": "System.String"
},
{
"Name": "ConfigurationMode",
"Value": "[parameters('configurationMode')]",
"TypeName": "System.String"
},
{
"Name": "ConfigurationModeFrequencyMins",
"Value": "[parameters('configurationModeFrequencyMins')]",
"TypeName": "System.Int32"
},
{
"Name": "RefreshFrequencyMins",
"Value": "[parameters('refreshFrequencyMins')]",
"TypeName": "System.Int32"
},
{
"Name": "RebootNodeIfNeeded",
"Value": "[parameters('rebootNodeIfNeeded')]",
"TypeName": "System.Boolean"
},
{
"Name": "ActionAfterReboot",
"Value": "[parameters('actionAfterReboot')]",
"TypeName": "System.String"
},
{
"Name": "AllowModuleOverwrite",
"Value": "[parameters('allowModuleOverwrite')]",
"TypeName": "System.Boolean"
},
{
"Name": "Timestamp",
"Value": "[parameters('timestamp')]",
"TypeName": "System.String"
}
]
}
}
}
]
},
"networkProfile": {
"networkInterfaceConfigurations": [
{
"name": "[concat(variables('nicName'), '-0')]",
"properties": {
"ipConfigurations": [
{
"name": "[concat(variables('nicName'),'-',0)]",
"properties": {
"loadBalancerBackendAddressPools": [
{
"id": "[variables('lbPoolID0')]"
}
],
"loadBalancerInboundNatPools": [
{
"id": "[variables('lbNatPoolID0')]"
}
],
"subnet": {
"id": "[variables('subnet0Ref')]"
}
}
}
],
"primary": true
}
}
]
},
"osProfile": {
"adminPassword": "[parameters('adminPassword')]",
"adminUsername": "[parameters('adminUsername')]",
"computernamePrefix": "[parameters('vmNodeType0Name')]",
"secrets": [
{
"sourceVault": {
"id": "[parameters('sourceVaultValue')]"
},
"vaultCertificates": [
{
"certificateStore": "[parameters('certificateStoreValue')]",
"certificateUrl": "[parameters('certificateUrlValue')]"
}
]
}
]
},
"storageProfile": {
"imageReference": {
"publisher": "[parameters('vmImagePublisher')]",
"offer": "[parameters('vmImageOffer')]",
"sku": "[parameters('vmImageSku')]",
"version": "[parameters('vmImageVersion')]"
},
"osDisk": {
"vhdContainers": [
"[concat('https://', variables('uniqueStringArray')[0], '.blob.core.windows.net/', parameters('vmStorageAccountContainerNameType0'))]",
"[concat('https://', variables('uniqueStringArray')[1], '.blob.core.windows.net/', parameters('vmStorageAccountContainerNameType0'))]",
"[concat('https://', variables('uniqueStringArray')[2], '.blob.core.windows.net/', parameters('vmStorageAccountContainerNameType0'))]",
"[concat('https://', variables('uniqueStringArray')[3], '.blob.core.windows.net/', parameters('vmStorageAccountContainerNameType0'))]",
"[concat('https://', variables('uniqueStringArray')[4], '.blob.core.windows.net/', parameters('vmStorageAccountContainerNameType0'))]"
],
"name": "vmssosdisk",
"caching": "ReadOnly",
"createOption": "FromImage"
}
}
}
},
"sku": {
"name": "[parameters('vmNodeType0Size')]",
"capacity": "5",
"tier": "Standard"
}
}

Resources