From 386446f4e68451e0e56971941a3325c0469deedf Mon Sep 17 00:00:00 2001 From: "Jonathan.Core" Date: Fri, 4 Oct 2024 17:22:12 -0400 Subject: [PATCH 1/7] Fix role assignment for c_desktopRead array to index of 4 vs 6 --- patterns/avd/avdArm.json | 241 ++++++++++++++-------------- patterns/avd/templates/deploy.bicep | 6 +- 2 files changed, 123 insertions(+), 124 deletions(-) diff --git a/patterns/avd/avdArm.json b/patterns/avd/avdArm.json index cc92e3072..54d63330c 100644 --- a/patterns/avd/avdArm.json +++ b/patterns/avd/avdArm.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "17337657613372291663" + "version": "0.30.23.60470", + "templateHash": "4187096250605177316" } }, "parameters": { @@ -191,7 +191,7 @@ "criteria": { "allOf": [ { - "query": " AzureDiagnostics\n | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdHostPoolLogData\"\n | sort by TimeGenerated\n | where TimeGenerated > now() - 5m\n | extend HostPoolName=tostring(split(ResultDescription, '|')[0])\n | extend ResourceGroup=tostring(split(ResultDescription, '|')[1])\n | extend Type=tostring(split(ResultDescription, '|')[2])\n | extend MaxSessionLimit=toint(split(ResultDescription, '|')[3])\n | extend NumberSessionHosts=toint(split(ResultDescription, '|')[4])\n | extend UserSessionsTotal=toint(split(ResultDescription, '|')[5])\n | extend UserSessionsDisconnected=toint(split(ResultDescription, '|')[6])\n | extend UserSessionsActive=toint(split(ResultDescription, '|')[7])\n | extend UserSessionsAvailable=toint(split(ResultDescription, '|')[8])\n | extend HostPoolPercentLoad=toint(split(ResultDescription, '|')[9])\n | extend HPResourceId=tostring(split(ResultDescription, '|')[13])\n | extend ResourceId=tostring(HPResourceId)\n | where HostPoolPercentLoad >= 85 and HostPoolPercentLoad < 95\n | where HostPoolName =~ 'xHostPoolNamex'\n ", + "query": " AzureDiagnostics\r\n | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdHostPoolLogData\"\r\n | sort by TimeGenerated\r\n | where TimeGenerated > now() - 5m\r\n | extend HostPoolName=tostring(split(ResultDescription, '|')[0])\r\n | extend ResourceGroup=tostring(split(ResultDescription, '|')[1])\r\n | extend Type=tostring(split(ResultDescription, '|')[2])\r\n | extend MaxSessionLimit=toint(split(ResultDescription, '|')[3])\r\n | extend NumberSessionHosts=toint(split(ResultDescription, '|')[4])\r\n | extend UserSessionsTotal=toint(split(ResultDescription, '|')[5])\r\n | extend UserSessionsDisconnected=toint(split(ResultDescription, '|')[6])\r\n | extend UserSessionsActive=toint(split(ResultDescription, '|')[7])\r\n | extend UserSessionsAvailable=toint(split(ResultDescription, '|')[8])\r\n | extend HostPoolPercentLoad=toint(split(ResultDescription, '|')[9])\r\n | extend HPResourceId=tostring(split(ResultDescription, '|')[13])\r\n | extend ResourceId=tostring(HPResourceId)\r\n | where HostPoolPercentLoad >= 85 and HostPoolPercentLoad < 95\r\n | where HostPoolName =~ 'xHostPoolNamex'\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -259,7 +259,7 @@ "criteria": { "allOf": [ { - "query": " AzureDiagnostics\n | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdHostPoolLogData\"\n | sort by TimeGenerated\n | where TimeGenerated > now() - 5m\n | extend HostPoolName=tostring(split(ResultDescription, '|')[0])\n | extend ResourceGroup=tostring(split(ResultDescription, '|')[1])\n | extend Type=tostring(split(ResultDescription, '|')[2])\n | extend MaxSessionLimit=toint(split(ResultDescription, '|')[3])\n | extend NumberSessionHosts=toint(split(ResultDescription, '|')[4])\n | extend UserSessionsTotal=toint(split(ResultDescription, '|')[5])\n | extend UserSessionsDisconnected=toint(split(ResultDescription, '|')[6])\n | extend UserSessionsActive=toint(split(ResultDescription, '|')[7])\n | extend UserSessionsAvailable=toint(split(ResultDescription, '|')[8])\n | extend HostPoolPercentLoad=toint(split(ResultDescription, '|')[9])\n | extend HPResourceId=tostring(split(ResultDescription, '|')[13])\n | extend ResourceId=tostring(HPResourceId)\n | where HostPoolPercentLoad >= 50 and HostPoolPercentLoad < 85\n | where HostPoolName =~ 'xHostPoolNamex'\n ", + "query": " AzureDiagnostics\r\n | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdHostPoolLogData\"\r\n | sort by TimeGenerated\r\n | where TimeGenerated > now() - 5m\r\n | extend HostPoolName=tostring(split(ResultDescription, '|')[0])\r\n | extend ResourceGroup=tostring(split(ResultDescription, '|')[1])\r\n | extend Type=tostring(split(ResultDescription, '|')[2])\r\n | extend MaxSessionLimit=toint(split(ResultDescription, '|')[3])\r\n | extend NumberSessionHosts=toint(split(ResultDescription, '|')[4])\r\n | extend UserSessionsTotal=toint(split(ResultDescription, '|')[5])\r\n | extend UserSessionsDisconnected=toint(split(ResultDescription, '|')[6])\r\n | extend UserSessionsActive=toint(split(ResultDescription, '|')[7])\r\n | extend UserSessionsAvailable=toint(split(ResultDescription, '|')[8])\r\n | extend HostPoolPercentLoad=toint(split(ResultDescription, '|')[9])\r\n | extend HPResourceId=tostring(split(ResultDescription, '|')[13])\r\n | extend ResourceId=tostring(HPResourceId)\r\n | where HostPoolPercentLoad >= 50 and HostPoolPercentLoad < 85\r\n | where HostPoolName =~ 'xHostPoolNamex'\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -327,7 +327,7 @@ "criteria": { "allOf": [ { - "query": " AzureDiagnostics\n | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdHostPoolLogData\"\n | sort by TimeGenerated\n | where TimeGenerated > now() - 5m\n | extend HostPoolName=tostring(split(ResultDescription, '|')[0])\n | extend ResourceGroup=tostring(split(ResultDescription, '|')[1])\n | extend Type=tostring(split(ResultDescription, '|')[2])\n | extend MaxSessionLimit=toint(split(ResultDescription, '|')[3])\n | extend NumberSessionHosts=toint(split(ResultDescription, '|')[4])\n | extend UserSessionsTotal=toint(split(ResultDescription, '|')[5])\n | extend UserSessionsDisconnected=toint(split(ResultDescription, '|')[6])\n | extend UserSessionsActive=toint(split(ResultDescription, '|')[7])\n | extend UserSessionsAvailable=toint(split(ResultDescription, '|')[8])\n | extend HostPoolPercentLoad=toint(split(ResultDescription, '|')[9])\n | extend HPResourceId=tostring(split(ResultDescription, '|')[13])\n | extend ResourceId=tostring(HPResourceId)\n | where HostPoolPercentLoad >= 95\n | where HostPoolName =~ 'xHostPoolNamex'\n ", + "query": " AzureDiagnostics\r\n | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdHostPoolLogData\"\r\n | sort by TimeGenerated\r\n | where TimeGenerated > now() - 5m\r\n | extend HostPoolName=tostring(split(ResultDescription, '|')[0])\r\n | extend ResourceGroup=tostring(split(ResultDescription, '|')[1])\r\n | extend Type=tostring(split(ResultDescription, '|')[2])\r\n | extend MaxSessionLimit=toint(split(ResultDescription, '|')[3])\r\n | extend NumberSessionHosts=toint(split(ResultDescription, '|')[4])\r\n | extend UserSessionsTotal=toint(split(ResultDescription, '|')[5])\r\n | extend UserSessionsDisconnected=toint(split(ResultDescription, '|')[6])\r\n | extend UserSessionsActive=toint(split(ResultDescription, '|')[7])\r\n | extend UserSessionsAvailable=toint(split(ResultDescription, '|')[8])\r\n | extend HostPoolPercentLoad=toint(split(ResultDescription, '|')[9])\r\n | extend HPResourceId=tostring(split(ResultDescription, '|')[13])\r\n | extend ResourceId=tostring(HPResourceId)\r\n | where HostPoolPercentLoad >= 95\r\n | where HostPoolName =~ 'xHostPoolNamex'\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -512,7 +512,7 @@ "criteria": { "allOf": [ { - "query": " Perf\n | where TimeGenerated > ago(15m)\n | where ObjectName == \"LogicalDisk\" and CounterName == \"% Free Space\"\n | where InstanceName !contains \"D:\"\n | where InstanceName !contains \"_Total\"| where CounterValue <= 10.00\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\n | summarize arg_max(TimeGenerated, *) by ComputerName\n | extend ComputerName=tolower(ComputerName)\n | project ComputerName, CounterValue, subscription, ResourceGroup, TimeGenerated\n | join kind = leftouter\n (\n WVDAgentHealthStatus\n | where TimeGenerated > ago(15m)\n | where _ResourceId contains \"xHostPoolNamex\"\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | summarize arg_max(TimeGenerated,*) by ComputerName\n | project VMresourceGroup, ComputerName, HostPool, _ResourceId\n ) on ComputerName\n | where ComputerName1 contains ComputerName\n ", + "query": " Perf\r\n | where TimeGenerated > ago(15m)\r\n | where ObjectName == \"LogicalDisk\" and CounterName == \"% Free Space\"\r\n | where InstanceName !contains \"D:\"\r\n | where InstanceName !contains \"_Total\"| where CounterValue <= 10.00\r\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\r\n | summarize arg_max(TimeGenerated, *) by ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | project ComputerName, CounterValue, subscription, ResourceGroup, TimeGenerated\r\n | join kind = leftouter\r\n (\r\n WVDAgentHealthStatus\r\n | where TimeGenerated > ago(15m)\r\n | where _ResourceId contains \"xHostPoolNamex\"\r\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\r\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | summarize arg_max(TimeGenerated,*) by ComputerName\r\n | project VMresourceGroup, ComputerName, HostPool, _ResourceId\r\n ) on ComputerName\r\n | where ComputerName1 contains ComputerName\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -559,7 +559,7 @@ "criteria": { "allOf": [ { - "query": " Perf\n | where TimeGenerated > ago(15m)\n | where ObjectName == \"LogicalDisk\" and CounterName == \"% Free Space\"\n | where InstanceName !contains \"D:\"\n | where InstanceName !contains \"_Total\"| where CounterValue <= 5.00\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\n | summarize arg_max(TimeGenerated, *) by ComputerName\n | extend ComputerName=tolower(ComputerName)\n | project ComputerName, CounterValue, subscription, ResourceGroup, TimeGenerated\n | join kind = leftouter\n (\n WVDAgentHealthStatus\n | where TimeGenerated > ago(15m)\n | where _ResourceId contains \"xHostPoolNamex\"\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | summarize arg_max(TimeGenerated,*) by ComputerName\n | project VMresourceGroup, ComputerName, HostPool, _ResourceId\n ) on ComputerName\n | where ComputerName1 contains ComputerName\n ", + "query": " Perf\r\n | where TimeGenerated > ago(15m)\r\n | where ObjectName == \"LogicalDisk\" and CounterName == \"% Free Space\"\r\n | where InstanceName !contains \"D:\"\r\n | where InstanceName !contains \"_Total\"| where CounterValue <= 5.00\r\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\r\n | summarize arg_max(TimeGenerated, *) by ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | project ComputerName, CounterValue, subscription, ResourceGroup, TimeGenerated\r\n | join kind = leftouter\r\n (\r\n WVDAgentHealthStatus\r\n | where TimeGenerated > ago(15m)\r\n | where _ResourceId contains \"xHostPoolNamex\"\r\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\r\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | summarize arg_max(TimeGenerated,*) by ComputerName\r\n | project VMresourceGroup, ComputerName, HostPool, _ResourceId\r\n ) on ComputerName\r\n | where ComputerName1 contains ComputerName\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -606,7 +606,7 @@ "criteria": { "allOf": [ { - "query": " Event\n | where EventLog == \"Microsoft-FSLogix-Apps/Admin\"\n | where EventLevelName == \"Warning\"\n | where EventID == 34\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\n | join kind = leftouter\n (\n WVDAgentHealthStatus\n | where _ResourceId contains \"xHostPoolNamex\"\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | summarize arg_max(TimeGenerated,*) by ComputerName\n | project VMresourceGroup, ComputerName, HostPool\n ) on ComputerName\n ", + "query": " Event\r\n | where EventLog == \"Microsoft-FSLogix-Apps/Admin\"\r\n | where EventLevelName == \"Warning\"\r\n | where EventID == 34\r\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\r\n | join kind = leftouter\r\n (\r\n WVDAgentHealthStatus\r\n | where _ResourceId contains \"xHostPoolNamex\"\r\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\r\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | summarize arg_max(TimeGenerated,*) by ComputerName\r\n | project VMresourceGroup, ComputerName, HostPool\r\n ) on ComputerName\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -659,7 +659,7 @@ "criteria": { "allOf": [ { - "query": " Event\n | where EventLog == \"Microsoft-FSLogix-Apps/Admin\"\n | where EventLevelName == \"Error\"\n | where EventID == 33\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\n | join kind = leftouter\n (\n WVDAgentHealthStatus\n | where _ResourceId contains \"xHostPoolNamex\"\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | summarize arg_max(TimeGenerated,*) by ComputerName\n | project VMresourceGroup, ComputerName, HostPool\n ) on ComputerName\n ", + "query": " Event\r\n | where EventLog == \"Microsoft-FSLogix-Apps/Admin\"\r\n | where EventLevelName == \"Error\"\r\n | where EventID == 33\r\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\r\n | join kind = leftouter\r\n (\r\n WVDAgentHealthStatus\r\n | where _ResourceId contains \"xHostPoolNamex\"\r\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\r\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | summarize arg_max(TimeGenerated,*) by ComputerName\r\n | project VMresourceGroup, ComputerName, HostPool\r\n ) on ComputerName\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -711,7 +711,7 @@ "criteria": { "allOf": [ { - "query": " Event\n | where EventLog == \"Microsoft-FSLogix-Apps/Admin\"\n | where EventLevelName == \"Error\"\n | where EventID == 43\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\n | join kind = leftouter\n (\n WVDAgentHealthStatus\n | where _ResourceId contains \"xHostPoolNamex\"\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | summarize arg_max(TimeGenerated,*) by ComputerName\n | project VMresourceGroup, ComputerName, HostPool\n ) on ComputerName\n ", + "query": " Event\r\n | where EventLog == \"Microsoft-FSLogix-Apps/Admin\"\r\n | where EventLevelName == \"Error\"\r\n | where EventID == 43\r\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\r\n | join kind = leftouter\r\n (\r\n WVDAgentHealthStatus\r\n | where _ResourceId contains \"xHostPoolNamex\"\r\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\r\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | summarize arg_max(TimeGenerated,*) by ComputerName\r\n | project VMresourceGroup, ComputerName, HostPool\r\n ) on ComputerName\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -764,7 +764,7 @@ "criteria": { "allOf": [ { - "query": " Event\n | where EventLog == \"Microsoft-FSLogix-Apps/Admin\"\n | where EventLevelName == \"Error\"\n | where EventID == 52 or EventID == 40\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\n | join kind = leftouter\n (\n WVDAgentHealthStatus\n | where _ResourceId contains \"xHostPoolNamex\"\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | summarize arg_max(TimeGenerated,*) by ComputerName\n | project VMresourceGroup, ComputerName, HostPool\n ) on ComputerName\n ", + "query": " Event\r\n | where EventLog == \"Microsoft-FSLogix-Apps/Admin\"\r\n | where EventLevelName == \"Error\"\r\n | where EventID == 52 or EventID == 40\r\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\r\n | join kind = leftouter\r\n (\r\n WVDAgentHealthStatus\r\n | where _ResourceId contains \"xHostPoolNamex\"\r\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\r\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | summarize arg_max(TimeGenerated,*) by ComputerName\r\n | project VMresourceGroup, ComputerName, HostPool\r\n ) on ComputerName\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -817,7 +817,7 @@ "criteria": { "allOf": [ { - "query": " Event\n | where EventLog == \"Microsoft-FSLogix-Apps/Admin\"\n | where EventLevelName == \"Warning\"\n | where EventID == 60\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\n | join kind = leftouter\n (\n WVDAgentHealthStatus\n | where _ResourceId contains \"xHostPoolNamex\"\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | summarize arg_max(TimeGenerated,*) by ComputerName\n | project VMresourceGroup, ComputerName, HostPool\n ) on ComputerName\n ", + "query": " Event\r\n | where EventLog == \"Microsoft-FSLogix-Apps/Admin\"\r\n | where EventLevelName == \"Warning\"\r\n | where EventID == 60\r\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\r\n | join kind = leftouter\r\n (\r\n WVDAgentHealthStatus\r\n | where _ResourceId contains \"xHostPoolNamex\"\r\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\r\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | summarize arg_max(TimeGenerated,*) by ComputerName\r\n | project VMresourceGroup, ComputerName, HostPool\r\n ) on ComputerName\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -870,7 +870,7 @@ "criteria": { "allOf": [ { - "query": " Event\n | where EventLog == \"Microsoft-FSLogix-Apps/Admin\"\n | where EventLevelName == \"Error\"\n | where EventID == 62 or EventID == 63\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\n | join kind = leftouter\n (\n WVDAgentHealthStatus\n | where _ResourceId contains \"xHostPoolNamex\"\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | summarize arg_max(TimeGenerated,*) by ComputerName\n | project VMresourceGroup, ComputerName, HostPool\n ) on ComputerName\n ", + "query": " Event\r\n | where EventLog == \"Microsoft-FSLogix-Apps/Admin\"\r\n | where EventLevelName == \"Error\"\r\n | where EventID == 62 or EventID == 63\r\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\r\n | join kind = leftouter\r\n (\r\n WVDAgentHealthStatus\r\n | where _ResourceId contains \"xHostPoolNamex\"\r\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\r\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | summarize arg_max(TimeGenerated,*) by ComputerName\r\n | project VMresourceGroup, ComputerName, HostPool\r\n ) on ComputerName\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -923,7 +923,7 @@ "criteria": { "allOf": [ { - "query": " Event\n | where EventLog == \"Microsoft-FSLogix-Apps/Operational\"\n | where EventLevelName == \"Warning\"\n | where EventID == 51\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\n | join kind = leftouter\n (\n WVDAgentHealthStatus\n | where _ResourceId contains \"xHostPoolNamex\"\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\n | extend ComputerName=tolower(ComputerName)\n | summarize arg_max(TimeGenerated,*) by ComputerName\n | project VMresourceGroup, ComputerName, HostPool\n ) on ComputerName\n ", + "query": " Event\r\n | where EventLog == \"Microsoft-FSLogix-Apps/Operational\"\r\n | where EventLevelName == \"Warning\"\r\n | where EventID == 51\r\n | parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" ResourceGroup \"/providers/microsoft.compute/virtualmachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated\r\n | join kind = leftouter\r\n (\r\n WVDAgentHealthStatus\r\n | where _ResourceId contains \"xHostPoolNamex\"\r\n | parse _ResourceId with \"/subscriptions/\" subscriptionAgentHealth \"/resourcegroups/\" ResourceGroupAgentHealth \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\r\n | parse SessionHostResourceId with \"/subscriptions/\" VMsubscription \"/resourceGroups/\" VMresourceGroup \"/providers/Microsoft.Compute/virtualMachines/\" ComputerName\r\n | extend ComputerName=tolower(ComputerName)\r\n | summarize arg_max(TimeGenerated,*) by ComputerName\r\n | project VMresourceGroup, ComputerName, HostPool\r\n ) on ComputerName\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -1030,7 +1030,7 @@ "criteria": { "allOf": [ { - "query": " // Personal Session Host where Health status is NOT healthy and the VM is assigned\n AzureDiagnostics\n | where Category has \"JobStreams\"\n and StreamType_s == \"Output\"\n and RunbookName_s == \"AvdHostPoolLogData\"\n | sort by TimeGenerated\n | where TimeGenerated > ago(15m)\n | extend HostPoolName=tostring(split(ResultDescription, '|')[0])\n | extend ResourceGroup=tostring(split(ResultDescription, '|')[1])\n | extend Type=tostring(split(ResultDescription, '|')[2])\n | extend NumberSessionHosts=toint(split(ResultDescription, '|')[4])\n | extend UserSessionsActive=toint(split(ResultDescription, '|')[7])\n | extend NumPersonalUnhealthy=toint(split(ResultDescription, '|')[10])\n | extend PersonalSessionHost=extract_json(\"$.SessionHost\", tostring(split(ResultDescription, '|')[11]), typeof(string))\n | extend PersonalAssignedUser=extract_json(\"$.AssignedUser\", tostring(split(ResultDescription, '|')[11]), typeof(string))\n | where HostPoolName =~ 'xHostPoolNamex'\n | where Type == 'Personal'\n | where NumPersonalUnhealthy > 0\n ", + "query": " // Personal Session Host where Health status is NOT healthy and the VM is assigned\r\n AzureDiagnostics\r\n | where Category has \"JobStreams\"\r\n and StreamType_s == \"Output\"\r\n and RunbookName_s == \"AvdHostPoolLogData\"\r\n | sort by TimeGenerated\r\n | where TimeGenerated > ago(15m)\r\n | extend HostPoolName=tostring(split(ResultDescription, '|')[0])\r\n | extend ResourceGroup=tostring(split(ResultDescription, '|')[1])\r\n | extend Type=tostring(split(ResultDescription, '|')[2])\r\n | extend NumberSessionHosts=toint(split(ResultDescription, '|')[4])\r\n | extend UserSessionsActive=toint(split(ResultDescription, '|')[7])\r\n | extend NumPersonalUnhealthy=toint(split(ResultDescription, '|')[10])\r\n | extend PersonalSessionHost=extract_json(\"$.SessionHost\", tostring(split(ResultDescription, '|')[11]), typeof(string))\r\n | extend PersonalAssignedUser=extract_json(\"$.AssignedUser\", tostring(split(ResultDescription, '|')[11]), typeof(string))\r\n | where HostPoolName =~ 'xHostPoolNamex'\r\n | where Type == 'Personal'\r\n | where NumPersonalUnhealthy > 0\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -1076,7 +1076,7 @@ "criteria": { "allOf": [ { - "query": " // Connection Errors\n // List connection checkpoints and errors for each connection attempt, along with detailed information across all users.\n //You can also uncomment the where clause to filter to a specific user if you are troubleshooting an issue.\n WVDConnections\n //| where UserName == \"upn.here@contoso.com\"\n | project-away TenantId,SourceSystem\n | summarize arg_max(TimeGenerated, *), StartTime = min(iff(State=='Started', TimeGenerated , datetime(null) )), ConnectTime = min(iff(State=='Connected', TimeGenerated , datetime(null) )) by CorrelationId\n | join kind=leftouter\n (\n WVDErrors\n |summarize Errors=make_list(pack('Code', Code, 'CodeSymbolic', CodeSymbolic, 'Time', TimeGenerated, 'Message', Message ,'ServiceError', ServiceError, 'Source', Source)) by CorrelationId\n ) on CorrelationId\n | join kind=leftouter\n (\n WVDCheckpoints\n | summarize Checkpoints=make_list(pack('Time', TimeGenerated, 'Name', Name, 'Parameters', Parameters, 'Source', Source)) by CorrelationId\n | mv-apply Checkpoints on\n (\n order by todatetime(Checkpoints['Time']) asc\n | summarize Checkpoints=make_list(Checkpoints)\n )\n ) on CorrelationId\n | project-away CorrelationId1, CorrelationId2\n | order by TimeGenerated desc\n | where TimeGenerated > ago(15m)\n | extend ResourceGroup=tostring(split(_ResourceId, '/')[4])\n | extend HostPool=tostring(split(_ResourceId, '/')[8])\n | where HostPool =~ 'xHostPoolNamex'\n | extend ErrorShort=tostring(Errors[0].CodeSymbolic)\n | extend ErrorMessage=tostring(Errors[0].Message)\n | project TimeGenerated, HostPool, ResourceGroup, UserName, ClientOS, ClientVersion, ClientSideIPAddress, ConnectionType, ErrorShort, ErrorMessage\n ", + "query": " // Connection Errors\r\n // List connection checkpoints and errors for each connection attempt, along with detailed information across all users.\r\n //You can also uncomment the where clause to filter to a specific user if you are troubleshooting an issue.\r\n WVDConnections\r\n //| where UserName == \"upn.here@contoso.com\"\r\n | project-away TenantId,SourceSystem\r\n | summarize arg_max(TimeGenerated, *), StartTime = min(iff(State=='Started', TimeGenerated , datetime(null) )), ConnectTime = min(iff(State=='Connected', TimeGenerated , datetime(null) )) by CorrelationId\r\n | join kind=leftouter\r\n (\r\n WVDErrors\r\n |summarize Errors=make_list(pack('Code', Code, 'CodeSymbolic', CodeSymbolic, 'Time', TimeGenerated, 'Message', Message ,'ServiceError', ServiceError, 'Source', Source)) by CorrelationId\r\n ) on CorrelationId\r\n | join kind=leftouter\r\n (\r\n WVDCheckpoints\r\n | summarize Checkpoints=make_list(pack('Time', TimeGenerated, 'Name', Name, 'Parameters', Parameters, 'Source', Source)) by CorrelationId\r\n | mv-apply Checkpoints on\r\n (\r\n order by todatetime(Checkpoints['Time']) asc\r\n | summarize Checkpoints=make_list(Checkpoints)\r\n )\r\n ) on CorrelationId\r\n | project-away CorrelationId1, CorrelationId2\r\n | order by TimeGenerated desc\r\n | where TimeGenerated > ago(15m)\r\n | extend ResourceGroup=tostring(split(_ResourceId, '/')[4])\r\n | extend HostPool=tostring(split(_ResourceId, '/')[8])\r\n | where HostPool =~ 'xHostPoolNamex'\r\n | extend ErrorShort=tostring(Errors[0].CodeSymbolic)\r\n | extend ErrorMessage=tostring(Errors[0].Message)\r\n | project TimeGenerated, HostPool, ResourceGroup, UserName, ClientOS, ClientVersion, ClientSideIPAddress, ConnectionType, ErrorShort, ErrorMessage\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -1166,7 +1166,7 @@ "criteria": { "allOf": [ { - "query": " AzureDiagnostics\n | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdStorageLogData\"\n | where split(ResultDescription, ',')[1] <> \"\"\n // StorageType / Subscription / RG / StorAcct / Share / Quota / GB Used / %Available\n | extend StorageType=split(ResultDescription, ',')[0]\n | extend Subscription=split(ResultDescription, ',')[1]\n | extend ResourceGroup=split(ResultDescription, ',')[2]\n | extend StorageAccount=tostring(split(ResultDescription, ',')[3])\n | extend Share=tostring(split(ResultDescription, ',')[4])\n | extend GBShareQuota=split(ResultDescription, ',')[5]\n | extend GBUsed=split(ResultDescription, ',')[6]\n | extend PercentAvailable=round(toreal(split(ResultDescription, ',')[7]))\n | extend ResourceId=tostring(split(ResultDescription, ',')[8])\n | summarize arg_max(TimeGenerated, *) by Share\n | where PercentAvailable <= 15.00\n | project TimeGenerated,ResourceId, StorageAccount, Share, PercentAvailable\n ", + "query": " AzureDiagnostics\r\n | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdStorageLogData\"\r\n | where split(ResultDescription, ',')[1] <> \"\"\r\n // StorageType / Subscription / RG / StorAcct / Share / Quota / GB Used / %Available\r\n | extend StorageType=split(ResultDescription, ',')[0]\r\n | extend Subscription=split(ResultDescription, ',')[1]\r\n | extend ResourceGroup=split(ResultDescription, ',')[2]\r\n | extend StorageAccount=tostring(split(ResultDescription, ',')[3])\r\n | extend Share=tostring(split(ResultDescription, ',')[4])\r\n | extend GBShareQuota=split(ResultDescription, ',')[5]\r\n | extend GBUsed=split(ResultDescription, ',')[6]\r\n | extend PercentAvailable=round(toreal(split(ResultDescription, ',')[7]))\r\n | extend ResourceId=tostring(split(ResultDescription, ',')[8])\r\n | summarize arg_max(TimeGenerated, *) by Share\r\n | where PercentAvailable <= 15.00\r\n | project TimeGenerated,ResourceId, StorageAccount, Share, PercentAvailable\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -1206,7 +1206,7 @@ "criteria": { "allOf": [ { - "query": " AzureDiagnostics\n | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdStorageLogData\"\n | where split(ResultDescription, ',')[1] <> \"\"\n // StorageType / Subscription / RG / StorAcct / Share / Quota / GB Used / %Available\n | extend StorageType=split(ResultDescription, ',')[0]\n | extend Subscription=split(ResultDescription, ',')[1]\n | extend ResourceGroup=split(ResultDescription, ',')[2]\n | extend StorageAccount=tostring(split(ResultDescription, ',')[3])\n | extend Share=tostring(split(ResultDescription, ',')[4])\n | extend GBShareQuota=split(ResultDescription, ',')[5]\n | extend GBUsed=split(ResultDescription, ',')[6]\n | extend PercentAvailable=round(toreal(split(ResultDescription, ',')[7]))\n | extend ResourceId=tostring(split(ResultDescription, ',')[8])\n | summarize arg_max(TimeGenerated, *) by Share\n | where PercentAvailable <= 5.00\n | project TimeGenerated,ResourceId, StorageAccount, Share, PercentAvailable\n ", + "query": " AzureDiagnostics\r\n | where Category has \"JobStreams\" and StreamType_s == \"Output\" and RunbookName_s == \"AvdStorageLogData\"\r\n | where split(ResultDescription, ',')[1] <> \"\"\r\n // StorageType / Subscription / RG / StorAcct / Share / Quota / GB Used / %Available\r\n | extend StorageType=split(ResultDescription, ',')[0]\r\n | extend Subscription=split(ResultDescription, ',')[1]\r\n | extend ResourceGroup=split(ResultDescription, ',')[2]\r\n | extend StorageAccount=tostring(split(ResultDescription, ',')[3])\r\n | extend Share=tostring(split(ResultDescription, ',')[4])\r\n | extend GBShareQuota=split(ResultDescription, ',')[5]\r\n | extend GBUsed=split(ResultDescription, ',')[6]\r\n | extend PercentAvailable=round(toreal(split(ResultDescription, ',')[7]))\r\n | extend ResourceId=tostring(split(ResultDescription, ',')[8])\r\n | summarize arg_max(TimeGenerated, *) by Share\r\n | where PercentAvailable <= 5.00\r\n | project TimeGenerated,ResourceId, StorageAccount, Share, PercentAvailable\r\n ", "timeAggregation": "Count", "dimensions": [ { @@ -1687,7 +1687,6 @@ "francesouth": "Central Europe Standard Time", "germanynorth": "Central Europe Standard Time", "germanywestcentral": "Central Europe Standard Time", - "italynorth": "Central Europe Standard Time", "japaneast": "Tokyo Standard Time", "japanwest": "Tokyo Standard Time", "jioindiacentral": "India Standard Time", @@ -1743,8 +1742,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "5058752684928521984" + "version": "0.30.23.60470", + "templateHash": "15010178760090743855" } }, "resources": [] @@ -1780,8 +1779,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "11322864259297613753" + "version": "0.30.23.60470", + "templateHash": "13748643536402199106" } }, "parameters": { @@ -1889,8 +1888,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "17543310634773508860" + "version": "0.30.23.60470", + "templateHash": "4065841540046378089" } }, "parameters": { @@ -2019,8 +2018,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "6463847624083642816" + "version": "0.30.23.60470", + "templateHash": "498093034878796354" } }, "parameters": { @@ -2391,8 +2390,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "12563928598330086965" + "version": "0.30.23.60470", + "templateHash": "4930253470371022993" } }, "parameters": { @@ -2779,8 +2778,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "4353281869531919329" + "version": "0.30.23.60470", + "templateHash": "1936225209226397716" } }, "parameters": { @@ -2933,8 +2932,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "3701692179022726039" + "version": "0.30.23.60470", + "templateHash": "10343348577509908541" } }, "parameters": { @@ -3126,8 +3125,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "9402313018859684605" + "version": "0.30.23.60470", + "templateHash": "16355881437855644491" } }, "parameters": { @@ -3328,8 +3327,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "397471861107660802" + "version": "0.30.23.60470", + "templateHash": "13266942762784094332" } }, "parameters": { @@ -3477,8 +3476,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "8963344948473108961" + "version": "0.30.23.60470", + "templateHash": "6017150840424720288" } }, "parameters": { @@ -3612,8 +3611,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "119275176924834536" + "version": "0.30.23.60470", + "templateHash": "12497168255623114364" } }, "parameters": { @@ -3751,8 +3750,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "3550007817971627238" + "version": "0.30.23.60470", + "templateHash": "1321383979596300962" } }, "parameters": { @@ -3934,8 +3933,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "9814932722075593301" + "version": "0.30.23.60470", + "templateHash": "4723293633061816660" } }, "parameters": { @@ -4405,8 +4404,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "11902399925935262531" + "version": "0.30.23.60470", + "templateHash": "2490155391384108519" } }, "parameters": { @@ -4602,8 +4601,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "6192850120284618277" + "version": "0.30.23.60470", + "templateHash": "3403408016021509565" } }, "parameters": { @@ -4737,8 +4736,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "2140491459278000142" + "version": "0.30.23.60470", + "templateHash": "16782741243796524245" } }, "parameters": { @@ -4951,8 +4950,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "5360170510896410270" + "version": "0.30.23.60470", + "templateHash": "13450589063357475601" } }, "parameters": { @@ -5151,8 +5150,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "1053852850180913136" + "version": "0.30.23.60470", + "templateHash": "11787974534224269342" } }, "parameters": { @@ -5708,8 +5707,8 @@ "condition": "[parameters('AllResourcesSameRG')]", "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", - "name": "[format('c_DsktpRead_{0}', split(parameters('AVDResourceGroupId'), '/')[6])]", - "resourceGroup": "[split(parameters('AVDResourceGroupId'), '/')[6]]", + "name": "[format('c_DsktpRead_{0}', split(parameters('AVDResourceGroupId'), '/')[4])]", + "resourceGroup": "[split(parameters('AVDResourceGroupId'), '/')[4]]", "properties": { "expressionEvaluationOptions": { "scope": "inner" @@ -5729,7 +5728,7 @@ "value": "ServicePrincipal" }, "resourceGroupName": { - "value": "[split(parameters('AVDResourceGroupId'), '/')[6]]" + "value": "[split(parameters('AVDResourceGroupId'), '/')[4]]" } }, "template": { @@ -5738,8 +5737,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "1053852850180913136" + "version": "0.30.23.60470", + "templateHash": "11787974534224269342" } }, "parameters": { @@ -6325,8 +6324,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "1053852850180913136" + "version": "0.30.23.60470", + "templateHash": "11787974534224269342" } }, "parameters": { @@ -6915,8 +6914,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "1053852850180913136" + "version": "0.30.23.60470", + "templateHash": "11787974534224269342" } }, "parameters": { @@ -7537,8 +7536,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "2263831094211789444" + "version": "0.30.23.60470", + "templateHash": "1840681092109838362" } }, "parameters": { @@ -7641,8 +7640,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "15793862848321122863" + "version": "0.30.23.60470", + "templateHash": "18302503168830922420" } }, "parameters": { @@ -7834,8 +7833,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "8546415982131375574" + "version": "0.30.23.60470", + "templateHash": "5987148713698590047" } }, "parameters": { @@ -8159,8 +8158,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "6422245838148534292" + "version": "0.30.23.60470", + "templateHash": "3985494900988965675" } }, "parameters": { @@ -8267,8 +8266,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "11074457460763785047" + "version": "0.30.23.60470", + "templateHash": "11594559233220382616" } }, "parameters": { @@ -8505,8 +8504,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "12041252330403960328" + "version": "0.30.23.60470", + "templateHash": "8095446035196327417" } }, "parameters": { @@ -8839,8 +8838,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "6422245838148534292" + "version": "0.30.23.60470", + "templateHash": "3985494900988965675" } }, "parameters": { @@ -8947,8 +8946,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "11074457460763785047" + "version": "0.30.23.60470", + "templateHash": "11594559233220382616" } }, "parameters": { @@ -9185,8 +9184,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "12041252330403960328" + "version": "0.30.23.60470", + "templateHash": "8095446035196327417" } }, "parameters": { @@ -9516,8 +9515,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "2453440311198353840" + "version": "0.30.23.60470", + "templateHash": "180910090874233226" } }, "parameters": { @@ -9617,8 +9616,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "11074457460763785047" + "version": "0.30.23.60470", + "templateHash": "11594559233220382616" } }, "parameters": { @@ -9855,8 +9854,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "12041252330403960328" + "version": "0.30.23.60470", + "templateHash": "8095446035196327417" } }, "parameters": { @@ -10186,8 +10185,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "3991173317981347704" + "version": "0.30.23.60470", + "templateHash": "6000324042661911370" } }, "parameters": { @@ -10287,8 +10286,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "11074457460763785047" + "version": "0.30.23.60470", + "templateHash": "11594559233220382616" } }, "parameters": { @@ -10525,8 +10524,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "12041252330403960328" + "version": "0.30.23.60470", + "templateHash": "8095446035196327417" } }, "parameters": { @@ -10856,8 +10855,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "3856560060130990510" + "version": "0.30.23.60470", + "templateHash": "9256535270993929306" } }, "parameters": { @@ -10960,8 +10959,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "11074457460763785047" + "version": "0.30.23.60470", + "templateHash": "11594559233220382616" } }, "parameters": { @@ -11198,8 +11197,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "12041252330403960328" + "version": "0.30.23.60470", + "templateHash": "8095446035196327417" } }, "parameters": { @@ -11548,8 +11547,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "16307584152834135217" + "version": "0.30.23.60470", + "templateHash": "1467621426818181348" } }, "parameters": { @@ -11778,8 +11777,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "1016019394103903210" + "version": "0.30.23.60470", + "templateHash": "11807894433946183941" } }, "parameters": { @@ -12105,8 +12104,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "10900225834298982679" + "version": "0.30.23.60470", + "templateHash": "4393845525828946838" } }, "parameters": { @@ -12215,8 +12214,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "16307584152834135217" + "version": "0.30.23.60470", + "templateHash": "1467621426818181348" } }, "parameters": { @@ -12445,8 +12444,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "1016019394103903210" + "version": "0.30.23.60470", + "templateHash": "11807894433946183941" } }, "parameters": { @@ -12790,8 +12789,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "10900225834298982679" + "version": "0.30.23.60470", + "templateHash": "4393845525828946838" } }, "parameters": { @@ -12900,8 +12899,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "16307584152834135217" + "version": "0.30.23.60470", + "templateHash": "1467621426818181348" } }, "parameters": { @@ -13130,8 +13129,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "1016019394103903210" + "version": "0.30.23.60470", + "templateHash": "11807894433946183941" } }, "parameters": { @@ -13499,8 +13498,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "1145150438806953897" + "version": "0.30.23.60470", + "templateHash": "11504384291380680725" } }, "parameters": { @@ -13654,8 +13653,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.29.47.4906", - "templateHash": "8166827751636452398" + "version": "0.30.23.60470", + "templateHash": "2473787457312022626" } }, "parameters": { @@ -13946,4 +13945,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/patterns/avd/templates/deploy.bicep b/patterns/avd/templates/deploy.bicep index bc2e076da..ad259653c 100644 --- a/patterns/avd/templates/deploy.bicep +++ b/patterns/avd/templates/deploy.bicep @@ -2244,14 +2244,14 @@ module roleAssignment_AutoAcctDesktopRead 'carml/1.3.0/Microsoft.Authorization/r module roleAssignment_AutoAcctDesktopReadSameRG 'carml/1.3.0/Microsoft.Authorization/roleAssignments/resourceGroup/deploy.bicep' = if (AllResourcesSameRG) { - scope: resourceGroup(split(AVDResourceGroupId, '/')[6]) - name: 'c_DsktpRead_${split(AVDResourceGroupId, '/')[6]}' + scope: resourceGroup(split(AVDResourceGroupId, '/')[4]) + name: 'c_DsktpRead_${split(AVDResourceGroupId, '/')[4]}' params: { enableDefaultTelemetry: false principalId: automationAccount.outputs.systemAssignedPrincipalId roleDefinitionIdOrName: 'Desktop Virtualization Reader' principalType: 'ServicePrincipal' - resourceGroupName: split(AVDResourceGroupId, '/')[6] + resourceGroupName: split(AVDResourceGroupId, '/')[4] } dependsOn: [ automationAccount From a84b9dc6f1d75b15f568ea5a3af6b42f6b463467 Mon Sep 17 00:00:00 2001 From: "Jonathan.Core" Date: Fri, 4 Oct 2024 17:42:25 -0400 Subject: [PATCH 2/7] Linter fix for missing new line at end of ARM/Json --- patterns/avd/avdArm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patterns/avd/avdArm.json b/patterns/avd/avdArm.json index 54d63330c..e2292757d 100644 --- a/patterns/avd/avdArm.json +++ b/patterns/avd/avdArm.json @@ -13945,4 +13945,4 @@ ] } ] -} \ No newline at end of file +} From cbbf81d07ba80b6b1bef770a813178a42a935a52 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 8 Oct 2024 15:57:14 +0200 Subject: [PATCH 3/7] Add workflow and tests --- .../Test-ArmTemplates.Tests.ps1 | 73 +++++++++++++++++++ .github/workflows/unit-test-arm-templates.yml | 42 +++++++++++ 2 files changed, 115 insertions(+) create mode 100644 .github/actions-pester/Test-ArmTemplates.Tests.ps1 create mode 100644 .github/workflows/unit-test-arm-templates.yml diff --git a/.github/actions-pester/Test-ArmTemplates.Tests.ps1 b/.github/actions-pester/Test-ArmTemplates.Tests.ps1 new file mode 100644 index 000000000..8becfbe40 --- /dev/null +++ b/.github/actions-pester/Test-ArmTemplates.Tests.ps1 @@ -0,0 +1,73 @@ +<# Script to validate ARM templates using the Test-AzTemplate cmdlet #> + +# Define a function to get the list of changed files in a pull request +function Get-ChangedFiles { + [CmdletBinding(SupportsShouldProcess)] + param ( + # Parameter to filter files by path + [Parameter()] + [String]$pathFilter, + + # Parameter to filter files by extension + [Parameter()] + [String]$extensionFilter, + + # Parameter to specify the pull request branch, defaulting to the GitHub head reference + [Parameter()] + [String]$PRBranch = "$($env:GITHUB_HEAD_REF)" + ) + + # Get the list of changed files between the main branch and the pull request branch + $changedFiles = git diff --name-only origin/main origin/$PRBranch + + # Create a regex pattern to filter files based on the provided path and extension + $regex = "$pathFilter.*\.$extensionFilter" + + # Filter the changed files using the regex pattern + $resultFiles = $changedFiles | Where-Object { $PSItem -match $regex } + + # Return the filtered files + $resultFiles | ForEach-Object { + return $_ + } +} + +# Get the list of modified ARM template files +$ModifiedFiles = @(Get-ChangedFiles -pathFilter 'templates/arm' -extensionFilter 'json') + +# Check if there are any modified ARM template files +if ($null -ne $ModifiedFiles) { + Write-Output "These are the modified ARM templates: $($ModifiedFiles)" +} else { + Write-Output "There are no modified ARM templates" +} + +# Initialize a counter for the number of failed tests +$NumberOfFailedTests = 0 + +# Iterate over each modified ARM template file +$ModifiedFiles | ForEach-Object { + $TemplatePath = $PSItem + Write-Output "Test $TemplatePath" + + # Run the Test-AzTemplate cmdlet to test the ARM template + $testResults = Test-AzTemplate -TemplatePath $TemplatePath -Test deploymentTemplate -ErrorAction Continue + + # Filter the test results to find any failed tests + $failedTests = $testResults | Where-Object { $PSItem.Passed -ne $True } + + # If there are failed tests, log a warning and increment the failed tests counter + if ($failedTests -ne $null) { + $failedTests | ForEach-Object { + Write-Warning "$($PSItem | Out-String)" + $NumberOfFailedTests++ + } + } +} + +# If there are any failed tests, log an error and exit with a non-zero status +If ($NumberOfFailedTests -gt 0) { + Write-Error "There are $NumberOfFailedTests failed tests" + exit 1 +} + diff --git a/.github/workflows/unit-test-arm-templates.yml b/.github/workflows/unit-test-arm-templates.yml new file mode 100644 index 000000000..80e81237c --- /dev/null +++ b/.github/workflows/unit-test-arm-templates.yml @@ -0,0 +1,42 @@ +name: Unit Test ARM templates with arm-ttk + +########################################## +# Start the job on PR for all branches # +######################################### + +# yamllint disable-line rule:truthy +on: + pull_request: + types: + - opened + - reopened + - synchronize + - ready_for_review + paths: + - "services/**/**/templates/arm/**.json" + workflow_dispatch: {} + +permissions: + id-token: write + contents: read + +jobs: + validate-arm-files: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: Clone ARM-TTK repo + uses: GuillaumeFalourd/clone-github-repo-action@v3 + with: + owner: 'Azure' + repository: 'arm-ttk' + - name: Test Modified ARM templates + shell: pwsh + run: | + Import-Module ./arm-ttk/arm-ttk/arm-ttk.psd1 + ./.github/actions-pester/Test-ArmTemplates.Tests.ps1 From 7d2f88c1ccbdcc53ac2095626293efe519a0f166 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:06:10 +0200 Subject: [PATCH 4/7] rm space --- .github/actions-pester/Test-ArmTemplates.Tests.ps1 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/actions-pester/Test-ArmTemplates.Tests.ps1 b/.github/actions-pester/Test-ArmTemplates.Tests.ps1 index 8becfbe40..c4f967882 100644 --- a/.github/actions-pester/Test-ArmTemplates.Tests.ps1 +++ b/.github/actions-pester/Test-ArmTemplates.Tests.ps1 @@ -16,13 +16,12 @@ function Get-ChangedFiles { [Parameter()] [String]$PRBranch = "$($env:GITHUB_HEAD_REF)" ) - # Get the list of changed files between the main branch and the pull request branch $changedFiles = git diff --name-only origin/main origin/$PRBranch - + # Create a regex pattern to filter files based on the provided path and extension $regex = "$pathFilter.*\.$extensionFilter" - + # Filter the changed files using the regex pattern $resultFiles = $changedFiles | Where-Object { $PSItem -match $regex } @@ -49,13 +48,13 @@ $NumberOfFailedTests = 0 $ModifiedFiles | ForEach-Object { $TemplatePath = $PSItem Write-Output "Test $TemplatePath" - + # Run the Test-AzTemplate cmdlet to test the ARM template $testResults = Test-AzTemplate -TemplatePath $TemplatePath -Test deploymentTemplate -ErrorAction Continue - + # Filter the test results to find any failed tests $failedTests = $testResults | Where-Object { $PSItem.Passed -ne $True } - + # If there are failed tests, log a warning and increment the failed tests counter if ($failedTests -ne $null) { $failedTests | ForEach-Object { From 82dba6d819e1354ee8869f96b0a19517a9a48537 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:07:29 +0200 Subject: [PATCH 5/7] yml syntax --- .github/workflows/unit-test-arm-templates.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-test-arm-templates.yml b/.github/workflows/unit-test-arm-templates.yml index 80e81237c..1a59510c6 100644 --- a/.github/workflows/unit-test-arm-templates.yml +++ b/.github/workflows/unit-test-arm-templates.yml @@ -1,3 +1,4 @@ +--- name: Unit Test ARM templates with arm-ttk ########################################## @@ -14,7 +15,7 @@ on: - ready_for_review paths: - "services/**/**/templates/arm/**.json" - workflow_dispatch: {} + workflow_dispatch: { } permissions: id-token: write From 338f4aeeec54075b70f90f028ccc7e25a4a4a4e9 Mon Sep 17 00:00:00 2001 From: Jan Faurskov <22591930+jfaurskov@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:11:39 +0200 Subject: [PATCH 6/7] linter error --- .github/actions-pester/Test-ArmTemplates.Tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions-pester/Test-ArmTemplates.Tests.ps1 b/.github/actions-pester/Test-ArmTemplates.Tests.ps1 index c4f967882..b2cb2cfbc 100644 --- a/.github/actions-pester/Test-ArmTemplates.Tests.ps1 +++ b/.github/actions-pester/Test-ArmTemplates.Tests.ps1 @@ -1,7 +1,7 @@ <# Script to validate ARM templates using the Test-AzTemplate cmdlet #> # Define a function to get the list of changed files in a pull request -function Get-ChangedFiles { +function Get-ChangedFile { [CmdletBinding(SupportsShouldProcess)] param ( # Parameter to filter files by path @@ -32,7 +32,7 @@ function Get-ChangedFiles { } # Get the list of modified ARM template files -$ModifiedFiles = @(Get-ChangedFiles -pathFilter 'templates/arm' -extensionFilter 'json') +$ModifiedFiles = @(Get-ChangedFile -pathFilter 'templates/arm' -extensionFilter 'json') # Check if there are any modified ARM template files if ($null -ne $ModifiedFiles) { From 069acccbb3bdda61e62383c46044ec4a0cc0f808 Mon Sep 17 00:00:00 2001 From: Joseph Barnes Date: Wed, 9 Oct 2024 11:15:30 -0500 Subject: [PATCH 7/7] added missing GUIDs for AVS --- services/AVS/privateClouds/alerts.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/AVS/privateClouds/alerts.yaml b/services/AVS/privateClouds/alerts.yaml index 171cf3288..b09eb54e6 100644 --- a/services/AVS/privateClouds/alerts.yaml +++ b/services/AVS/privateClouds/alerts.yaml @@ -68,6 +68,7 @@ values: - '*' threshold: 80.0 + guid: 282cb835-592b-4e49-89c1-ea1aaefb37c4 - name: CPUCritical description: CPU Usage per Cluster (Critical) type: Metric @@ -90,6 +91,7 @@ values: - '*' threshold: 95.0 + guid: bb83ae53-3b91-49ff-a351-9545ea747335 - name: Memory description: Memory Usage per Cluster type: Metric @@ -112,6 +114,7 @@ values: - '*' threshold: 80.0 + guid: e840c7a9-e070-4dc9-919b-c75a3679f6b7 - name: MemoryCritical description: Memory Usage per Cluster (Critical) type: Metric @@ -134,6 +137,7 @@ values: - '*' threshold: 95.0 + guid: a2f5e5a3-ec38-4201-970f-971ad4707b93 - name: Storage description: Storage Usage per Datastore type: Metric @@ -156,3 +160,4 @@ values: - '*' threshold: 70.0 + guid: 8bafb3d5-d961-49a4-9867-f1cddfd703e0