From 9aba86746e6ceb2b61adc688a47e8cefe2a35dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jainayu=F0=9F=9A=80?= Date: Tue, 21 Nov 2023 15:35:23 +0530 Subject: [PATCH 1/8] Connector Integration Changes --- .../AIOpsInsights/SAP AMS.workbook | 51 ++++++++++++++++--- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook index a7df04b781..43f55df99b 100644 --- a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook +++ b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook @@ -44,10 +44,17 @@ }, "defaultValue": "value::1", "queryType": 12 + }, + { + "id": "99ee3471-1541-42b9-be8a-dd1c63ef87c5", + "version": "KqlParameterItem/1.0", + "name": "showAdvancedInsights", + "type": 1, + "value": "false" } ], "style": "above", - "queryType": 12 + "queryType": 0 }, "conditionalVisibility": { "parameterName": "hidden", @@ -588,6 +595,11 @@ "name": "resourceId", "source": "static", "value": "{amsResource}" + }, + { + "name": "showAdvancedInsights", + "source": "static", + "value": "{showAdvancedInsights}" } ] } @@ -679,7 +691,7 @@ "name": "selTab", "type": 11, "isRequired": true, - "query": "let options=datatable(value:string)[\"Availability\",\"Performance\"];\r\nunion (\r\n options\r\n | where (\"{nwExists}\"==\"true\" or \"{hanaExists}\"==\"true\") and value==\"Availability\"\r\n), (\r\n options\r\n | where \"{nwExists}\"==\"true\" and value==\"Performance\"\r\n)", + "query": "let options=datatable(value:string)[\"Availability\",\"Performance\",\"Advanced\"];\r\nunion (\r\n options\r\n | where (\"{nwExists}\"==\"true\" or \"{hanaExists}\"==\"true\") and value==\"Availability\"\r\n), (\r\n options\r\n | where \"{nwExists}\"==\"true\" and value==\"Performance\"\r\n), (\r\n options\r\n | where \"{showAdvancedInsights}\"==\"true\" and value==\"Advanced\"\r\n)", "crossComponentResources": [ "{workspace}" ], @@ -1529,10 +1541,17 @@ ], "exportParameters": true }, - "conditionalVisibility": { - "parameterName": "selSID", - "comparison": "isNotEqualTo" - }, + "conditionalVisibilities": [ + { + "parameterName": "selSID", + "comparison": "isNotEqualTo" + }, + { + "parameterName": "selTab", + "comparison": "isNotEqualTo", + "value": "Advanced" + } + ], "name": "alertsPane" }, { @@ -2477,6 +2496,26 @@ "value": "Performance" }, "name": "performance" + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "anomalyData_CL", + "size": 3, + "timeContextFromParameter": "timePeriod", + "queryType": 0, + "resourceType": "microsoft.operationalinsights/workspaces", + "crossComponentResources": [ + "/subscriptions/ade68fe0-eb3e-4178-ab09-c5f06f7fb575/resourceGroups/rg-aw-dev-uksouth-compute/providers/Microsoft.OperationalInsights/workspaces/la-aw-dev-uksouth" + ] + }, + "conditionalVisibility": { + "parameterName": "selTab", + "comparison": "isEqualTo", + "value": "Advanced" + }, + "name": "advInsightsQuery" } ] }, From 0bd3be77f6a0b291cf4f94303f2c213b657e1804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jainayu=F0=9F=9A=80?= Date: Tue, 21 Nov 2023 15:40:12 +0530 Subject: [PATCH 2/8] New Query for Advanced Insights Landing Page --- .../AIOpsInsights/SAP AMS.workbook | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook index 43f55df99b..51f32117a4 100644 --- a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook +++ b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook @@ -2501,14 +2501,40 @@ "type": 3, "content": { "version": "KqlItem/1.0", - "query": "anomalyData_CL", - "size": 3, + "query": "anomalyData_CL\r\n| project TimeGenerated, ScopeType_s, Scope_s,scenario_s, SID_s, InsightsMessage_s, ConstituentInsights_s, Recommendation_s\r\n| where SID_s == \"{selSID}\"\r\n| summarize arg_max(TimeGenerated, ConstituentInsights_s), arg_max(TimeGenerated, Recommendation_s), arg_max(strlen(InsightsMessage_s), InsightsMessage_s), anomalyLoggedTime = min(TimeGenerated) by bin(TimeGenerated, 30m), SID_s, ScopeType_s, Scope_s, scenario_s\r\n| project anomalyLoggedTime, scenario_s, SID_s, ScopeType_s, Scope_s, InsightsMessage_s, ConstituentInsights_s, Recommendation_s\r\n| extend alertTitle = \r\n case(\r\n scenario_s matches regex \"^Performance/Netweaver/HighResponseTime$\", \"High Response Time for NetWeaver Detected\",\r\n scenario_s matches regex \"^Performance/Netweaver/CPUUtilization$\", \"High CPU Utilization for NetWeaver Detected\",\r\n scenario_s matches regex \"^Performance/Netweaver/WorkerProcessUtilization$\", \"High Worker Process Utilization for NetWeaver Detected\",\r\n strcat(\"Unknown Operation for NetWeaver: \", scenario_s)\r\n )\r\n| extend scopeData = strcat(ScopeType_s, \": \", Scope_s), Action = \"Investigate\"", + "size": 0, "timeContextFromParameter": "timePeriod", "queryType": 0, "resourceType": "microsoft.operationalinsights/workspaces", "crossComponentResources": [ "/subscriptions/ade68fe0-eb3e-4178-ab09-c5f06f7fb575/resourceGroups/rg-aw-dev-uksouth-compute/providers/Microsoft.OperationalInsights/workspaces/la-aw-dev-uksouth" - ] + ], + "visualization": "tiles", + "tileSettings": { + "titleContent": { + "columnMatch": "alertTitle", + "formatter": 1 + }, + "subtitleContent": { + "columnMatch": "anomalyLoggedTime", + "formatter": 6 + }, + "leftContent": { + "columnMatch": "SID_s", + "formatter": 1 + }, + "rightContent": { + "columnMatch": "scopeData" + }, + "secondaryContent": { + "columnMatch": "Action", + "formatter": 1 + }, + "showBorder": true, + "sortCriteriaField": "anomalyLoggedTime", + "sortOrderField": 2, + "size": "full" + } }, "conditionalVisibility": { "parameterName": "selTab", From 4ecd01903ae7be9a61487f64039ce9de73cc0777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jainayu=F0=9F=9A=80?= Date: Wed, 13 Dec 2023 22:08:52 +0530 Subject: [PATCH 3/8] Adv Insights Changes Dev Version --- .../Auto Perf RCA.workbook | 203 ++++++++++++++- .../AIOpsInsights/SAP AMS.workbook | 239 +++++++++++++++++- 2 files changed, 435 insertions(+), 7 deletions(-) diff --git a/Workbooks/SapMonitor2.0/AIOpsInsights/Performance Insights/Auto Perf RCA.workbook b/Workbooks/SapMonitor2.0/AIOpsInsights/Performance Insights/Auto Perf RCA.workbook index 2ff9a57000..bea77a9b3c 100644 --- a/Workbooks/SapMonitor2.0/AIOpsInsights/Performance Insights/Auto Perf RCA.workbook +++ b/Workbooks/SapMonitor2.0/AIOpsInsights/Performance Insights/Auto Perf RCA.workbook @@ -5,9 +5,6 @@ "type": 9, "content": { "version": "KqlParameterItem/1.0", - "crossComponentResources": [ - "{AMSResource}" - ], "parameters": [ { "id": "7a987b04-690f-4e6c-a7b0-296d2e9aa403", @@ -203,6 +200,41 @@ "name": "AlertName", "type": 1, "isHiddenWhenLocked": true + }, + { + "id": "4ca0f8a4-8cc1-4250-9aec-99f9f0445cb5", + "version": "KqlParameterItem/1.0", + "name": "Scenario", + "type": 1, + "isHiddenWhenLocked": true + }, + { + "id": "740611e9-656e-4212-9f73-b09f17d1f034", + "version": "KqlParameterItem/1.0", + "name": "Scope", + "type": 1, + "isHiddenWhenLocked": true + }, + { + "id": "7c5cd3ad-962a-4061-ac96-0fc620cf2101", + "version": "KqlParameterItem/1.0", + "name": "InsightsMessage", + "type": 1, + "isHiddenWhenLocked": true + }, + { + "id": "eeda92a2-6383-448f-ba09-9ba1466495dc", + "version": "KqlParameterItem/1.0", + "name": "ConstituentInsights", + "type": 1, + "isHiddenWhenLocked": true + }, + { + "id": "7b74d397-fc8e-471d-bfcc-1e0c99fc386e", + "version": "KqlParameterItem/1.0", + "name": "RecommendationJson", + "type": 1, + "isHiddenWhenLocked": true } ], "style": "pills", @@ -233,6 +265,59 @@ }, "name": "mainOverview" }, + { + "type": 1, + "content": { + "json": "#### Insights\r\n{InsightsMessage}\r\n\r\n{ConstituentInsights}\r\n" + }, + "name": "AdvInsightsMessage", + "styleSettings": { + "showBorder": true + } + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "WorkloadInsights_anomalyData_CL\r\n| where Scope_s == \"{Scope}\" and SID_s == \"{SID}\" and TimeGenerated == \"{AlertFired}\" and scenario_s == \"{Scenario}\"\r\n| extend ParsedJson = parse_json(Recommendation_s)\r\n| extend VM = tostring(bag_keys(ParsedJson)[0])\r\n| extend Message = split(tostring(ParsedJson[VM]), @\" | \")\r\n| mv-expand Message\r\n| project VM, Message", + "size": 4, + "title": "Recommendations", + "queryType": 0, + "resourceType": "microsoft.operationalinsights/workspaces", + "crossComponentResources": [ + "/subscriptions/ade68fe0-eb3e-4178-ab09-c5f06f7fb575/resourceGroups/rg-aw-dev-uksouth-compute/providers/Microsoft.OperationalInsights/workspaces/la-aw-dev-uksouth" + ], + "gridSettings": { + "formatters": [ + { + "columnMatch": "VM", + "formatter": 1, + "formatOptions": { + "customColumnWidthSetting": "10%" + } + }, + { + "columnMatch": "Message", + "formatter": 1, + "formatOptions": { + "customColumnWidthSetting": "90%" + } + } + ], + "labelSettings": [ + { + "columnId": "Message", + "label": "Recommended Actions" + } + ] + } + }, + "conditionalVisibility": { + "parameterName": "RecommendationJson", + "comparison": "isNotEqualTo" + }, + "name": "AdvInsightsRecommendations" + }, { "type": 3, "content": { @@ -277,10 +362,122 @@ "parameterName": "ShowPlot", "comparison": "isEqualTo", "value": "true" + }, + { + "parameterName": "Scenario", + "comparison": "isEqualTo" } ], "name": "responseTimePlot" }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "let endTime=todatetime(\"{EndTime}\");\r\nlet startTime=todatetime(\"{StartTime}\");\r\nlet binSize=tolong(\"{MinutesBin}\");\r\n \r\nSapNetweaver_ABAPGetWPTable_CL\r\n| where TimeGenerated between (startTime .. endTime) and SID_s==\"{SID}\" and \"{Provider}\" contains PROVIDER_INSTANCE_s\r\n| extend appServer = strcat(hostname_s, '_', tostring(toint(instanceNr_d)))\r\n| extend appServerAndWorkType = strcat(appServer, '-', Typ_s)\r\n| where appServerAndWorkType == \"{Scope}\"\r\n| summarize totalWP = count(), freeWP = countif(Status_s == 'Wait') by bin(TimeGenerated, iff(binSize<60, 1m, binSize*1m))\r\n| extend utilizationPctWP = round(toreal(totalWP - freeWP) / toreal(totalWP) * 100, 3)", + "size": 1, + "aggregation": 3, + "queryType": 0, + "resourceType": "microsoft.operationalinsights/workspaces", + "crossComponentResources": [ + "{Workspace}" + ], + "visualization": "timechart" + }, + "conditionalVisibility": { + "parameterName": "Scenario", + "comparison": "isEqualTo", + "value": "Performance/Netweaver/WorkerProcessUtilization" + }, + "name": "AdvInsights-NW-WPU" + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "let endTime=todatetime(\"{EndTime}\");\r\nlet startTime=todatetime(\"{StartTime}\");\r\nlet binSize=tolong(\"{MinutesBin}\");\r\n \r\nSapNetweaver_SWNC_CL \r\n| where TimeGenerated between (startTime .. endTime) and SID_s==\"{SID}\" and \"{Provider}\" contains PROVIDER_INSTANCE_s and Task_Type_Name_s == \"{Scope}\"\r\n| summarize ResponseTime = avg(ST03_Avg_Resp_Time_d) by bin(TimeGenerated, iff(binSize<60, 1m, binSize*1m))", + "size": 1, + "aggregation": 3, + "title": "Response Time (ms) Task Type: {Scope}", + "queryType": 0, + "resourceType": "microsoft.operationalinsights/workspaces", + "crossComponentResources": [ + "{Workspace}" + ], + "visualization": "timechart", + "chartSettings": { + "seriesLabelSettings": [ + { + "seriesName": "ResponseTime", + "label": "Response Time" + } + ], + "ySettings": { + "numberFormatSettings": { + "unit": 23, + "options": { + "style": "decimal", + "useGrouping": true + } + } + } + } + }, + "conditionalVisibility": { + "parameterName": "Scenario", + "comparison": "isEqualTo", + "value": "Performance/Netweaver/HighResponseTime" + }, + "name": "AdvInsights-NW-HRT" + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "let endTime=todatetime(\"{EndTime}\");\r\nlet startTime=todatetime(\"{StartTime}\");\r\nlet binSize=tolong(\"{MinutesBin}\");\r\n \r\nSapNetweaver_SMON_CL\r\n| where TimeGenerated between (startTime .. endTime) and SID_s==\"{SID}\" and \"{Provider}\" contains PROVIDER_INSTANCE_s\r\n| extend instanceNr_s = iff(strlen(instanceNr_s) == 1, strcat(\"0\", instanceNr_s), instanceNr_s)\r\n| extend appServer = strcat(hostname_s, \"_\", instanceNr_s)\r\n| where appServer == \"{Scope}\"\r\n| extend totalCPU = 100 - IDLE_TOTAL_d\r\n| summarize avg(totalCPU) by bin(TimeGenerated, iff(binSize<60, 1m, binSize*1m))", + "size": 1, + "aggregation": 3, + "queryType": 0, + "resourceType": "microsoft.operationalinsights/workspaces", + "crossComponentResources": [ + "{Workspace}" + ], + "visualization": "timechart" + }, + "conditionalVisibility": { + "parameterName": "Scenario", + "comparison": "isEqualTo", + "value": "Performance/Netweaver/CPUUtilization" + }, + "name": "AdvInsights-NW-CPUU" + }, + { + "type": 3, + "content": { + "version": "KqlItem/1.0", + "query": "let endTime=todatetime(\"{EndTime}\");\r\nlet startTime=todatetime(\"{StartTime}\");\r\nlet binSize=tolong(\"{MinutesBin}\");\r\nlet tableSystemOverview = (\r\n SapHana_SystemOverview_CL \r\n | where TimeGenerated >= startTime\r\n | extend SID_s = tostring(VALUE_s)\r\n | extend PROVIDER_INSTANCE_s = tostring(PROVIDER_INSTANCE_s)\r\n | where NAME_s == \"Instance ID\"\r\n | distinct SID_s, PROVIDER_INSTANCE_s\r\n);\r\nSapHana_LoadHistory_CL\r\n| where TimeGenerated between (startTime .. endTime)\r\n| join kind=leftouter (tableSystemOverview) on PROVIDER_INSTANCE_s\r\n| where SID_s==\"{SID}\" and \"{Provider}\" contains PROVIDER_INSTANCE_s\r\n| where HOST_s == \"{Scope}\"\r\n| summarize avg(CPU_d) by bin(TimeGenerated, iff(binSize<60, 1m, binSize*1m))", + "size": 1, + "queryType": 0, + "resourceType": "microsoft.operationalinsights/workspaces", + "crossComponentResources": [ + "{Workspace}" + ], + "visualization": "timechart" + }, + "conditionalVisibilities": [ + { + "parameterName": "Scenario", + "comparison": "isEqualTo", + "value": "Performance/Hana/CPUUtilization" + }, + { + "parameterName": "hidden", + "comparison": "isEqualTo", + "value": "true" + } + ], + "name": "AdvInsights-Hana-CPUU" + }, { "type": 3, "content": { diff --git a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook index 51f32117a4..dc90fe6997 100644 --- a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook +++ b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook @@ -2501,7 +2501,7 @@ "type": 3, "content": { "version": "KqlItem/1.0", - "query": "anomalyData_CL\r\n| project TimeGenerated, ScopeType_s, Scope_s,scenario_s, SID_s, InsightsMessage_s, ConstituentInsights_s, Recommendation_s\r\n| where SID_s == \"{selSID}\"\r\n| summarize arg_max(TimeGenerated, ConstituentInsights_s), arg_max(TimeGenerated, Recommendation_s), arg_max(strlen(InsightsMessage_s), InsightsMessage_s), anomalyLoggedTime = min(TimeGenerated) by bin(TimeGenerated, 30m), SID_s, ScopeType_s, Scope_s, scenario_s\r\n| project anomalyLoggedTime, scenario_s, SID_s, ScopeType_s, Scope_s, InsightsMessage_s, ConstituentInsights_s, Recommendation_s\r\n| extend alertTitle = \r\n case(\r\n scenario_s matches regex \"^Performance/Netweaver/HighResponseTime$\", \"High Response Time for NetWeaver Detected\",\r\n scenario_s matches regex \"^Performance/Netweaver/CPUUtilization$\", \"High CPU Utilization for NetWeaver Detected\",\r\n scenario_s matches regex \"^Performance/Netweaver/WorkerProcessUtilization$\", \"High Worker Process Utilization for NetWeaver Detected\",\r\n strcat(\"Unknown Operation for NetWeaver: \", scenario_s)\r\n )\r\n| extend scopeData = strcat(ScopeType_s, \": \", Scope_s), Action = \"Investigate\"", + "query": "WorkloadInsights_anomalyData_CL\r\n| project TimeGenerated, ScopeType_s, Scope_s,scenario_s, SID_s, InsightsMessage_s, ConstituentInsights_s, Recommendation_s, Title_s\r\n| where SID_s == \"{selSID}\"\r\n| summarize arg_max(TimeGenerated, ConstituentInsights_s), arg_max(TimeGenerated, Recommendation_s), arg_max(strlen(InsightsMessage_s), InsightsMessage_s), anomalyLoggedTime = min(TimeGenerated) by bin(TimeGenerated, 30m), SID_s, ScopeType_s, Scope_s, scenario_s, Title_s\r\n| project anomalyLoggedTime, scenario_s, SID_s, ScopeType_s, Scope_s, InsightsMessage_s, ConstituentInsights_s, Recommendation_s, Title_s\r\n| extend scopeData = strcat(ScopeType_s, \": \", Scope_s), Action = \"Investigate\"", "size": 0, "timeContextFromParameter": "timePeriod", "queryType": 0, @@ -2509,10 +2509,168 @@ "crossComponentResources": [ "/subscriptions/ade68fe0-eb3e-4178-ab09-c5f06f7fb575/resourceGroups/rg-aw-dev-uksouth-compute/providers/Microsoft.OperationalInsights/workspaces/la-aw-dev-uksouth" ], - "visualization": "tiles", + "visualization": "table", + "gridSettings": { + "formatters": [ + { + "columnMatch": "anomalyLoggedTime", + "formatter": 6, + "formatOptions": { + "customColumnWidthSetting": "20%" + } + }, + { + "columnMatch": "scenario_s", + "formatter": 5 + }, + { + "columnMatch": "ScopeType_s", + "formatter": 5 + }, + { + "columnMatch": "Scope_s", + "formatter": 5 + }, + { + "columnMatch": "InsightsMessage_s", + "formatter": 5 + }, + { + "columnMatch": "ConstituentInsights_s", + "formatter": 5 + }, + { + "columnMatch": "Recommendation_s", + "formatter": 5 + }, + { + "columnMatch": "Action", + "formatter": 1, + "formatOptions": { + "linkTarget": "WorkbookTemplate", + "linkIsContextBlade": true, + "workbookContext": { + "componentIdSource": "workbook", + "resourceIdsSource": "workbook", + "templateIdSource": "static", + "templateId": "Community-Workbooks/SapMonitor2.0/AIOpsInsights/Performance Insights", + "typeSource": "workbook", + "gallerySource": "workbook", + "locationSource": "default", + "workbookName": "Performance insights for {selSID}", + "passSpecificParams": true, + "templateParameters": [ + { + "name": "TimeRange", + "source": "parameter", + "value": "timePeriod" + }, + { + "name": "SID", + "source": "parameter", + "value": "selSID" + }, + { + "name": "AlertFired", + "source": "column", + "value": "anomalyLoggedTime" + }, + { + "name": "Scenario", + "source": "column", + "value": "scenario_s" + }, + { + "name": "Scope", + "source": "column", + "value": "Scope_s" + }, + { + "name": "Provider", + "source": "static", + "value": "{providerInstance}" + }, + { + "name": "AlertTemplate", + "source": "static", + "value": "sapnetweaver-response-time" + }, + { + "name": "AlertName", + "source": "column", + "value": "Title_s" + }, + { + "name": "InsightsMessage", + "source": "column", + "value": "InsightsMessage_s" + }, + { + "name": "ConstituentInsights", + "source": "column", + "value": "ConstituentInsights_s" + }, + { + "name": "RecommendationJson", + "source": "column", + "value": "Recommendation_s" + } + ], + "viewerMode": false + } + } + } + ], + "labelSettings": [ + { + "columnId": "anomalyLoggedTime", + "label": "Time" + }, + { + "columnId": "scenario_s", + "label": "Scenario" + }, + { + "columnId": "SID_s", + "label": "SID" + }, + { + "columnId": "ScopeType_s", + "label": "ScopeType" + }, + { + "columnId": "Scope_s", + "label": "Scope" + }, + { + "columnId": "InsightsMessage_s", + "label": "Message" + }, + { + "columnId": "ConstituentInsights_s", + "label": "Constituent Insights" + }, + { + "columnId": "Recommendation_s", + "label": "Recommendations" + }, + { + "columnId": "Title_s", + "label": "Title" + }, + { + "columnId": "scopeData", + "label": "Scope" + }, + { + "columnId": "Action", + "label": "Action" + } + ] + }, "tileSettings": { "titleContent": { - "columnMatch": "alertTitle", + "columnMatch": "Title_s", "formatter": 1 }, "subtitleContent": { @@ -2528,7 +2686,80 @@ }, "secondaryContent": { "columnMatch": "Action", - "formatter": 1 + "formatter": 1, + "formatOptions": { + "linkTarget": "WorkbookTemplate", + "linkIsContextBlade": true, + "workbookContext": { + "componentIdSource": "workbook", + "resourceIdsSource": "workbook", + "templateIdSource": "static", + "templateId": "Community-Workbooks/SapMonitor2.0/AIOpsInsights/Performance Insights", + "typeSource": "workbook", + "gallerySource": "workbook", + "locationSource": "default", + "workbookName": "Performance insights for {selSID}", + "passSpecificParams": true, + "templateParameters": [ + { + "name": "TimeRange", + "source": "parameter", + "value": "timePeriod" + }, + { + "name": "SID", + "source": "parameter", + "value": "selSID" + }, + { + "name": "AlertFired", + "source": "column", + "value": "anomalyLoggedTime" + }, + { + "name": "Scenario", + "source": "column", + "value": "scenario_s" + }, + { + "name": "Scope", + "source": "column", + "value": "Scope_s" + }, + { + "name": "Provider", + "source": "static", + "value": "{providerInstance}" + }, + { + "name": "AlertTemplate", + "source": "static", + "value": "sapnetweaver-response-time" + }, + { + "name": "AlertName", + "source": "column", + "value": "Title_s" + }, + { + "name": "InsightsMessage", + "source": "column", + "value": "InsightsMessage_s" + }, + { + "name": "ConstituentInsights", + "source": "column", + "value": "ConstituentInsights_s" + }, + { + "name": "RecommendationJson", + "source": "column", + "value": "Recommendation_s" + } + ], + "viewerMode": false + } + } }, "showBorder": true, "sortCriteriaField": "anomalyLoggedTime", From ae27ece5714ce4471ead5e9b722e1906172a7ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jainayu=F0=9F=9A=80?= Date: Wed, 13 Dec 2023 22:25:38 +0530 Subject: [PATCH 4/8] Changes Adv Insights LA to AMS LA --- .../Performance Insights/Auto Perf RCA.workbook | 12 ++++++------ .../SapMonitor2.0/AIOpsInsights/SAP AMS.workbook | 14 +++++++++++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Workbooks/SapMonitor2.0/AIOpsInsights/Performance Insights/Auto Perf RCA.workbook b/Workbooks/SapMonitor2.0/AIOpsInsights/Performance Insights/Auto Perf RCA.workbook index bea77a9b3c..51e1c92da0 100644 --- a/Workbooks/SapMonitor2.0/AIOpsInsights/Performance Insights/Auto Perf RCA.workbook +++ b/Workbooks/SapMonitor2.0/AIOpsInsights/Performance Insights/Auto Perf RCA.workbook @@ -285,7 +285,7 @@ "queryType": 0, "resourceType": "microsoft.operationalinsights/workspaces", "crossComponentResources": [ - "/subscriptions/ade68fe0-eb3e-4178-ab09-c5f06f7fb575/resourceGroups/rg-aw-dev-uksouth-compute/providers/Microsoft.OperationalInsights/workspaces/la-aw-dev-uksouth" + "{Workspace}" ], "gridSettings": { "formatters": [ @@ -466,11 +466,11 @@ }, "conditionalVisibilities": [ { - "parameterName": "Scenario", - "comparison": "isEqualTo", - "value": "Performance/Hana/CPUUtilization" - }, - { + "parameterName": "Scenario", + "comparison": "isEqualTo", + "value": "Performance/Hana/CPUUtilization" + }, + { "parameterName": "hidden", "comparison": "isEqualTo", "value": "true" diff --git a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook index dc90fe6997..fd78369f4b 100644 --- a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook +++ b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook @@ -2507,7 +2507,7 @@ "queryType": 0, "resourceType": "microsoft.operationalinsights/workspaces", "crossComponentResources": [ - "/subscriptions/ade68fe0-eb3e-4178-ab09-c5f06f7fb575/resourceGroups/rg-aw-dev-uksouth-compute/providers/Microsoft.OperationalInsights/workspaces/la-aw-dev-uksouth" + "{workspace}" ], "visualization": "table", "gridSettings": { @@ -2621,6 +2621,12 @@ } } ], + "sortBy": [ + { + "itemKey": "anomalyLoggedTime", + "sortOrder": 2 + } + ], "labelSettings": [ { "columnId": "anomalyLoggedTime", @@ -2668,6 +2674,12 @@ } ] }, + "sortBy": [ + { + "itemKey": "anomalyLoggedTime", + "sortOrder": 2 + } + ], "tileSettings": { "titleContent": { "columnMatch": "Title_s", From 973d79f9e59764db6023bb450413128196825860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jainayu=F0=9F=9A=80?= Date: Wed, 13 Dec 2023 23:10:53 +0530 Subject: [PATCH 5/8] Conditional Visibility for Advanced Tab --- .../AIOpsInsights/SAP AMS.workbook | 83 +++++++++++++++++-- 1 file changed, 77 insertions(+), 6 deletions(-) diff --git a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook index fd78369f4b..7edeb2003a 100644 --- a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook +++ b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook @@ -82,7 +82,7 @@ "version": "KqlParameterItem/1.0", "name": "tableExists", "type": 1, - "query": "let checktable = (tb:string, columnName:string)\r\n{\r\n// 0 = no error\r\n// 1 = table does not exist (need to enable RFC)\r\n// 2 = table exists, but column v1 does not (or) column v1 exists but no data in the table (need to wait)\r\nlet dummy = \"unmöglicher-wert!\";\r\nlet MissingTable = view () { print miss = 1, columnV1 = dummy, records = -1 };\r\nlet checkRecords =\r\n union\r\n isfuzzy=true MissingTable,\r\n (table(tb)\r\n | summarize records = count()\r\n )\r\n | project records\r\n | top 1 by records desc\r\n;\r\nlet checkTableExists =\r\n union\r\n isfuzzy=true MissingTable,\r\n (table(tb)\r\n | count\r\n | extend miss = 0\r\n )\r\n | project miss\r\n | limit 2\r\n | top 1 by miss asc\r\n;\r\nlet checkColumnExists =\r\n union\r\n isfuzzy=true MissingTable,\r\n (table(tb)\r\n | extend miss = 0\r\n | extend columnV1 = column_ifexists(columnName, dummy)\r\n )\r\n | project miss, columnV1\r\n | limit 2\r\n | top 1 by miss asc\r\n ;\r\nlet tableExists = toscalar(checkTableExists | summarize max(miss) != 1);\r\nlet columnV1Exists = toscalar(checkColumnExists | summarize max(columnV1) != dummy);\r\nlet tableRecords = toscalar(checkRecords | summarize max(records));\r\nlet x = iif(tableExists, iif(columnV1Exists, iif(tableRecords > 0, \"0\", \"2\"), \"2\"), \"1\");\r\ntoscalar(x)\r\n};\r\nlet system = checktable('SapNetweaver_GetSystemInstanceList_CL', 'SID_s');\r\nlet process = checktable('SapNetweaver_GetProcessList_CL', 'SID_s');\r\nlet vms = checktable('COMMON_VM_ArmId_Mapping_CL', 'VM_ARM_ID_s');\r\nlet hana = checktable('SapHana_SystemAvailability_CL', 'PROVIDER_INSTANCE_s');\r\n\r\nprint strcat(\r\n'{\"SapNetweaver_GetSystemInstanceList_CL\":',system, ',',\r\n'\"SapNetweaver_GetProcessList_CL\":',process, ',',\r\n'\"SapHana_SystemAvailability_CL\":',hana, ',',\r\n'\"COMMON_VM_ArmId_Mapping_CL\":',vms, '}')", + "query": "let checktable = (tb:string, columnName:string)\r\n{\r\n// 0 = no error\r\n// 1 = table does not exist (need to enable RFC)\r\n// 2 = table exists, but column v1 does not (or) column v1 exists but no data in the table (need to wait)\r\nlet dummy = \"unmöglicher-wert!\";\r\nlet MissingTable = view () { print miss = 1, columnV1 = dummy, records = -1 };\r\nlet checkRecords =\r\n union\r\n isfuzzy=true MissingTable,\r\n (table(tb)\r\n | summarize records = count()\r\n )\r\n | project records\r\n | top 1 by records desc\r\n;\r\nlet checkTableExists =\r\n union\r\n isfuzzy=true MissingTable,\r\n (table(tb)\r\n | count\r\n | extend miss = 0\r\n )\r\n | project miss\r\n | limit 2\r\n | top 1 by miss asc\r\n;\r\nlet checkColumnExists =\r\n union\r\n isfuzzy=true MissingTable,\r\n (table(tb)\r\n | extend miss = 0\r\n | extend columnV1 = column_ifexists(columnName, dummy)\r\n )\r\n | project miss, columnV1\r\n | limit 2\r\n | top 1 by miss asc\r\n ;\r\nlet tableExists = toscalar(checkTableExists | summarize max(miss) != 1);\r\nlet columnV1Exists = toscalar(checkColumnExists | summarize max(columnV1) != dummy);\r\nlet tableRecords = toscalar(checkRecords | summarize max(records));\r\nlet x = iif(tableExists, iif(columnV1Exists, iif(tableRecords > 0, \"0\", \"2\"), \"2\"), \"1\");\r\ntoscalar(x)\r\n};\r\nlet system = checktable('SapNetweaver_GetSystemInstanceList_CL', 'SID_s');\r\nlet process = checktable('SapNetweaver_GetProcessList_CL', 'SID_s');\r\nlet vms = checktable('COMMON_VM_ArmId_Mapping_CL', 'VM_ARM_ID_s');\r\nlet hana = checktable('SapHana_SystemAvailability_CL', 'PROVIDER_INSTANCE_s');\r\nlet adv = checktable('WorkloadInsights_anomalyData_CL', 'SID_s');\r\n\r\nprint strcat(\r\n'{\"SapNetweaver_GetSystemInstanceList_CL\":',system, ',',\r\n'\"SapNetweaver_GetProcessList_CL\":',process, ',',\r\n'\"SapHana_SystemAvailability_CL\":',hana, ',',\r\n'\"COMMON_VM_ArmId_Mapping_CL\":',vms, ',',\r\n'\"WorkloadInsights_anomalyData_CL\":',adv, '}')", "crossComponentResources": [ "{workspace}" ], @@ -169,6 +169,26 @@ "defaultValue": "value::1", "queryType": 0, "resourceType": "microsoft.operationalinsights/workspaces" + }, + { + "id": "9326a92c-ea85-4f98-95db-acb17eaaca4c", + "version": "KqlParameterItem/1.0", + "name": "advInsightsExists", + "type": 2, + "query": "print input = parse_json('{tableExists}')\r\n| mv-apply input to typeof(dynamic) on (\r\n project error=tostring(input[\"WorkloadInsights_anomalyData_CL\"])\r\n | where isnotempty(error)\r\n | project error = tolong(error)\r\n)\r\n| project value=iff(error==0, true, false)", + "crossComponentResources": [ + "{workspace}" + ], + "isHiddenWhenLocked": true, + "typeSettings": { + "additionalResourceOptions": [ + "value::1" + ], + "showDefault": false + }, + "defaultValue": "value::1", + "queryType": 0, + "resourceType": "microsoft.operationalinsights/workspaces" } ], "style": "pills", @@ -2497,6 +2517,50 @@ }, "name": "performance" }, + { + "type": 12, + "content": { + "version": "NotebookGroup/1.0", + "groupType": "editable", + "items": [ + { + "type": 1, + "content": { + "json": "" + }, + "customWidth": "20", + "name": "buffer" + }, + { + "type": 1, + "content": { + "json": "### Please enable advanced insights by visiting Configure Insights" + }, + "customWidth": "60", + "conditionalVisibility": { + "parameterName": "advInsightsExists", + "comparison": "isEqualTo", + "value": "false" + }, + "name": "EnableAdvInsightsMessage" + }, + { + "type": 1, + "content": { + "json": "" + }, + "customWidth": "20", + "name": "buffer" + } + ] + }, + "conditionalVisibility": { + "parameterName": "advInsightsExists", + "comparison": "isEqualTo", + "value": "false" + }, + "name": "EnableInsightsMessageGroup" + }, { "type": 3, "content": { @@ -2779,11 +2843,18 @@ "size": "full" } }, - "conditionalVisibility": { - "parameterName": "selTab", - "comparison": "isEqualTo", - "value": "Advanced" - }, + "conditionalVisibilities": [ + { + "parameterName": "selTab", + "comparison": "isEqualTo", + "value": "Advanced" + }, + { + "parameterName": "advInsightsExists", + "comparison": "isEqualTo", + "value": "true" + } + ], "name": "advInsightsQuery" } ] From 0251a96342e25aa5fb566bace5e7f372901d4612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jainayu=F0=9F=9A=80?= Date: Wed, 13 Dec 2023 23:19:20 +0530 Subject: [PATCH 6/8] Fix for Conditional Visibility --- .../AIOpsInsights/SAP AMS.workbook | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook index 7edeb2003a..7fa1691b9a 100644 --- a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook +++ b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook @@ -2554,11 +2554,18 @@ } ] }, - "conditionalVisibility": { - "parameterName": "advInsightsExists", - "comparison": "isEqualTo", - "value": "false" - }, + "conditionalVisibilities": [ + { + "parameterName": "advInsightsExists", + "comparison": "isEqualTo", + "value": "false" + }, + { + "parameterName": "selTab", + "comparison": "isEqualTo", + "value": "Advanced" + } + ], "name": "EnableInsightsMessageGroup" }, { From 294bd7f2a0d18dfa50de0c89e5d70665a75459e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jainayu=F0=9F=9A=80?= Date: Thu, 14 Dec 2023 15:57:46 +0530 Subject: [PATCH 7/8] Temp Changes --- Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook index 7fa1691b9a..f46eb78c48 100644 --- a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook +++ b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook @@ -2534,7 +2534,7 @@ { "type": 1, "content": { - "json": "### Please enable advanced insights by visiting Configure Insights" + "json": "### Please enable advanced insights by visiting Configure Insights Hello" }, "customWidth": "60", "conditionalVisibility": { From 10000eab7ab7edf1dfd19e7d8c02dc8c6f578011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jainayu=F0=9F=9A=80?= Date: Thu, 14 Dec 2023 16:28:37 +0530 Subject: [PATCH 8/8] Changing message for enabling advanced Insights --- Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook index f46eb78c48..32e30cc26a 100644 --- a/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook +++ b/Workbooks/SapMonitor2.0/AIOpsInsights/SAP AMS.workbook @@ -2528,15 +2528,15 @@ "content": { "json": "" }, - "customWidth": "20", + "customWidth": "10", "name": "buffer" }, { "type": 1, "content": { - "json": "### Please enable advanced insights by visiting Configure Insights Hello" + "json": "### Please configure insights and enable advanced insights. If you have already done this, hang tight until you see your first anomaly. " }, - "customWidth": "60", + "customWidth": "80", "conditionalVisibility": { "parameterName": "advInsightsExists", "comparison": "isEqualTo", @@ -2549,7 +2549,7 @@ "content": { "json": "" }, - "customWidth": "20", + "customWidth": "10", "name": "buffer" } ]