Skip to content

Commit b537da8

Browse files
authored
Merge pull request #586 from JCoreMS/JCore-Brownfield-Alerts-QueryFixFeb8
JCore brownfield alerts - fix query for AVD Agent Health
2 parents d91decb + 5a3644c commit b537da8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

workload/arm/brownfield/deployAlerts.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@
968968
"criteria": {
969969
"allOf": [
970970
{
971-
"query": "// HealthChecks of SessionHost \n// Renders a summary of SessionHost health status. \nlet MapToDesc = (idx: long) {\n case(idx == 0, \"DomainJoin\",\n idx == 1, \"DomainTrust\",\n idx == 2, \"FSLogix\",\n idx == 3, \"SxSStack\",\n idx == 4, \"URLCheck\",\n idx == 5, \"GenevaAgent\",\n idx == 6, \"DomainReachable\",\n idx == 7, \"WebRTCRedirector\",\n idx == 8, \"SxSStackEncryption\",\n idx == 9, \"IMDSReachable\",\n idx == 10, \"MSIXPackageStaging\",\n \"InvalidIndex\")\n};\nWVDAgentHealthStatus\n| where TimeGenerated > ago(10m)\n| where Status != 'Available'\n| where AllowNewSessions = True\n| extend CheckFailed = parse_json(SessionHostHealthCheckResult)\n| mv-expand CheckFailed\n| where CheckFailed.AdditionalFailureDetails.ErrorCode != 0\n| extend HealthCheckName = tolong(CheckFailed.HealthCheckName)\n| extend HealthCheckResult = tolong(CheckFailed.HealthCheckResult)\n| extend HealthCheckDesc = MapToDesc(HealthCheckName)\n| where HealthCheckDesc != 'InvalidIndex'\n| where _ResourceId contains \"xHostPoolNamex\"\n| parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" HostPoolResourceGroup \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\n| parse SessionHostResourceId with \"/subscriptions/\" HostSubscription \"/resourceGroups/\" SessionHostRG \" /providers/Microsoft.Compute/virtualMachines/\" SessionHostName\n",
971+
"query": "// HealthChecks of SessionHost \n// Renders a summary of SessionHost health status. \nlet MapToDesc = (idx: long) {\n case(idx == 0, \"DomainJoin\",\n idx == 1, \"DomainTrust\",\n idx == 2, \"FSLogix\",\n idx == 3, \"SxSStack\",\n idx == 4, \"URLCheck\",\n idx == 5, \"GenevaAgent\",\n idx == 6, \"DomainReachable\",\n idx == 7, \"WebRTCRedirector\",\n idx == 8, \"SxSStackEncryption\",\n idx == 9, \"IMDSReachable\",\n idx == 10, \"MSIXPackageStaging\",\n \"InvalidIndex\")\n};\nWVDAgentHealthStatus\n| where TimeGenerated > ago(10m)\n| where Status != 'Available'\n| where AllowNewSessions = True\n| extend CheckFailed = parse_json(SessionHostHealthCheckResult)\n| mv-expand CheckFailed\n| where CheckFailed.AdditionalFailureDetails.ErrorCode != 0\n| extend HealthCheckName = tolong(CheckFailed.HealthCheckName)\n| extend HealthCheckResult = tolong(CheckFailed.HealthCheckResult)\n| extend HealthCheckDesc = MapToDesc(HealthCheckName)\n| where HealthCheckDesc != 'InvalidIndex'\n| where _ResourceId contains \"xHostPoolNamex\"\n| parse _ResourceId with \"/subscriptions/\" subscription \"/resourcegroups/\" HostPoolResourceGroup \"/providers/microsoft.desktopvirtualization/hostpools/\" HostPool\n| parse SessionHostResourceId with \"/subscriptions/\" HostSubscription \"/resourceGroups/\" SessionHostRG \"/providers/Microsoft.Compute/virtualMachines/\" SessionHostName\n",
972972
"timeAggregation": "Count",
973973
"dimensions": [
974974
{
@@ -1318,7 +1318,7 @@
13181318
"targetResourceType": "Microsoft.Storage/storageAccounts"
13191319
},
13201320
{
1321-
"name": "[format('{0}-StorAzFilesAvailBlw-99-Prcnt', parameters('AlertNamePrefix'))]",
1321+
"name": "[format('{0}-StorAzFilesAvailBlw-99.99-Prcnt', parameters('AlertNamePrefix'))]",
13221322
"displayName": "[format('{0}-Storage-Azure Files Availability', parameters('AlertNamePrefix'))]",
13231323
"description": "[format('{0}\nThis could indicate storage is unavailable for user Profiles or Apps using MSIX App Attach.', variables('AlertDescriptionHeader'))]",
13241324
"severity": 1,
@@ -1327,7 +1327,7 @@
13271327
"criteria": {
13281328
"allOf": [
13291329
{
1330-
"threshold": 99,
1330+
"threshold": 99.99,
13311331
"name": "Metric1",
13321332
"metricName": "Availability",
13331333
"operator": "LessThanOrEqual",
@@ -13910,4 +13910,4 @@
1391013910
]
1391113911
}
1391213912
]
13913-
}
13913+
}

workload/bicep/brownfield/alerts/deploy.bicep

+3-3
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ var LogAlertsHostPool = [
11211121
criteria: {
11221122
allOf: [
11231123
{
1124-
query: '// HealthChecks of SessionHost \n// Renders a summary of SessionHost health status. \nlet MapToDesc = (idx: long) {\n case(idx == 0, "DomainJoin",\n idx == 1, "DomainTrust",\n idx == 2, "FSLogix",\n idx == 3, "SxSStack",\n idx == 4, "URLCheck",\n idx == 5, "GenevaAgent",\n idx == 6, "DomainReachable",\n idx == 7, "WebRTCRedirector",\n idx == 8, "SxSStackEncryption",\n idx == 9, "IMDSReachable",\n idx == 10, "MSIXPackageStaging",\n "InvalidIndex")\n};\nWVDAgentHealthStatus\n| where TimeGenerated > ago(10m)\n| where Status != \'Available\'\n| where AllowNewSessions = True\n| extend CheckFailed = parse_json(SessionHostHealthCheckResult)\n| mv-expand CheckFailed\n| where CheckFailed.AdditionalFailureDetails.ErrorCode != 0\n| extend HealthCheckName = tolong(CheckFailed.HealthCheckName)\n| extend HealthCheckResult = tolong(CheckFailed.HealthCheckResult)\n| extend HealthCheckDesc = MapToDesc(HealthCheckName)\n| where HealthCheckDesc != \'InvalidIndex\'\n| where _ResourceId contains "xHostPoolNamex"\n| parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" HostPoolResourceGroup "/providers/microsoft.desktopvirtualization/hostpools/" HostPool\n| parse SessionHostResourceId with "/subscriptions/" HostSubscription "/resourceGroups/" SessionHostRG " /providers/Microsoft.Compute/virtualMachines/" SessionHostName\n'
1124+
query: '// HealthChecks of SessionHost \n// Renders a summary of SessionHost health status. \nlet MapToDesc = (idx: long) {\n case(idx == 0, "DomainJoin",\n idx == 1, "DomainTrust",\n idx == 2, "FSLogix",\n idx == 3, "SxSStack",\n idx == 4, "URLCheck",\n idx == 5, "GenevaAgent",\n idx == 6, "DomainReachable",\n idx == 7, "WebRTCRedirector",\n idx == 8, "SxSStackEncryption",\n idx == 9, "IMDSReachable",\n idx == 10, "MSIXPackageStaging",\n "InvalidIndex")\n};\nWVDAgentHealthStatus\n| where TimeGenerated > ago(10m)\n| where Status != \'Available\'\n| where AllowNewSessions = True\n| extend CheckFailed = parse_json(SessionHostHealthCheckResult)\n| mv-expand CheckFailed\n| where CheckFailed.AdditionalFailureDetails.ErrorCode != 0\n| extend HealthCheckName = tolong(CheckFailed.HealthCheckName)\n| extend HealthCheckResult = tolong(CheckFailed.HealthCheckResult)\n| extend HealthCheckDesc = MapToDesc(HealthCheckName)\n| where HealthCheckDesc != \'InvalidIndex\'\n| where _ResourceId contains "xHostPoolNamex"\n| parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" HostPoolResourceGroup "/providers/microsoft.desktopvirtualization/hostpools/" HostPool\n| parse SessionHostResourceId with "/subscriptions/" HostSubscription "/resourceGroups/" SessionHostRG "/providers/Microsoft.Compute/virtualMachines/" SessionHostName\n'
11251125
timeAggregation: 'Count'
11261126
dimensions: [
11271127
{
@@ -1557,7 +1557,7 @@ var MetricAlerts = {
15571557
targetResourceType: 'Microsoft.Storage/storageAccounts'
15581558
}
15591559
{
1560-
name: '${AlertNamePrefix}-StorAzFilesAvailBlw-99-Prcnt'
1560+
name: '${AlertNamePrefix}-StorAzFilesAvailBlw-99.99-Prcnt'
15611561
displayName: '${AlertNamePrefix}-Storage-Azure Files Availability'
15621562
description: '${AlertDescriptionHeader}\nThis could indicate storage is unavailable for user Profiles or Apps using MSIX App Attach.'
15631563
severity: 1
@@ -1566,7 +1566,7 @@ var MetricAlerts = {
15661566
criteria: {
15671567
allOf: [
15681568
{
1569-
threshold: 99
1569+
threshold: 99.99
15701570
name: 'Metric1'
15711571
metricName: 'Availability'
15721572
operator: 'LessThanOrEqual'

0 commit comments

Comments
 (0)