|
| 1 | +--- |
| 2 | +title: Enable Insights to troubleshoot SAP workload issues |
| 3 | +description: Learn to enable SAP Insights on your AMS instance to troubleshoot SAP workload issues. |
| 4 | +author: akarshprabhu |
| 5 | +ms.service: sap-on-azure |
| 6 | +ms.subservice: sap-monitor |
| 7 | +ms.topic: how-to |
| 8 | +ms.date: 05/10/2023 |
| 9 | +ms.author: akak |
| 10 | +#Customer intent: I am an SAP BASIS or cloud infrastructure team member, I want to enable SAP Insights on my Azure monitor for SAP Instance. |
| 11 | +--- |
| 12 | + |
| 13 | +# Enable Insights to troubleshoot SAP workload issues (preview) |
| 14 | + |
| 15 | +[!INCLUDE [Azure Monitor for SAP solutions public preview notice](./includes/preview-sap-insights.md)] |
| 16 | + |
| 17 | +The Insights capability in Azure Monitor for SAP Solutions helps you troubleshoot Availability and Performance issues on your SAP workloads. It helps you correlate key SAP components issues with SAP logs, Azure platform metrics and health events. |
| 18 | +In this how-to-guide, learn to enable Insights in Azure Monitor for SAP solutions. You can use SAP Insights with only the latest version of the service, *Azure Monitor for SAP solutions* and not *Azure Monitor for SAP solutions (classic)* |
| 19 | + |
| 20 | +> [!NOTE] |
| 21 | +> This section applies to only Azure Monitor for SAP solutions. |
| 22 | +
|
| 23 | +## Prerequisites |
| 24 | + |
| 25 | +- An Azure subscription. |
| 26 | +- An existing Azure Monitor for SAP solutions resource. To create an Azure Monitor for SAP solutions resource, see the [quickstart for the Azure portal](quickstart-portal.md) or the [quickstart for PowerShell](quickstart-powershell.md). |
| 27 | +- An existing NetWeaver and HANA(optional) provider. To configure a NetWeaver provider, see the How to guides for [NetWeaver provider configuration](provider-netweaver.md). |
| 28 | +- (Optional) Alerts set up for availability and/or performance issues on the NetWeaver/HANA provider. To configure a NetWeaver provider, see the How to guides for [setting up Alerts on Azure Monitor for SAP](get-alerts-portal.md) |
| 29 | + |
| 30 | +## Steps to Enable Insights in Azure Monitor for SAP solutions |
| 31 | + |
| 32 | +To enable Insights for Azure Monitor for SAP solutions, you need to: |
| 33 | + |
| 34 | +1. [Run a PowerShell script for access](#run-a-powershell-script-for-access) |
| 35 | +1. [Prerequisite - Unprotect methods](#unprotect-the-getenvironment-method) |
| 36 | + |
| 37 | +### Run a PowerShell script for access |
| 38 | + |
| 39 | +> [!Note] |
| 40 | +> The intent of this step is to give the Azure Monitor for SAP solutions(AMS) instance access to the virtual machines that host the SAP systems you want to monitor. This will help your AMS instance correlate issues you face with Azure infrastructure telemetry, giving you an end-to-end troubleshooting experience. |
| 41 | +This script gives your AMS instance Reader role permission over the subscriptions that hold the SAP systems. Feel free to modify the script to scope it down to a resource group or a set of virtual machines. |
| 42 | + |
| 43 | +1. Download the onboarding script [from GitHub](https://github.com/Azure/Azure-Monitor-for-SAP-solutions-preview/blob/main/Scripts/AMS_AIOPS_SETUP.ps1) |
| 44 | +1. Go to the Azure portal and select the Cloud Shell tab from the menu bar at the top. Refer [this guide](/articles/cloud-shell/quickstart.md) to get started with Cloud Shell. |
| 45 | +1. Switch from Bash to PowerShell. |
| 46 | +:::image type="content" source="./media/enable-sap-insights/powershell-upload.png" alt-text="Screenshot that shows the upload button on Azure CLI."::: |
| 47 | +1. Upload the script downloaded in the first step. |
| 48 | +1. Navigate to the folder where the script is present using the command: |
| 49 | +```PowerShell |
| 50 | +cd <script_path> |
| 51 | +``` |
| 52 | +6. Set the AMS Resource/ARM ID with the command: |
| 53 | +```PowerShell |
| 54 | +$armId = "<AMS ARM ID>" |
| 55 | +``` |
| 56 | +7. If the VMs belong to a different subscription than AMS, set the list of subscriptions in which VMs of the SAP system are present (use subscription IDs): |
| 57 | +```PowerShell |
| 58 | +$subscriptions = "<Subscription ID 1>","<Subscription ID 2>" |
| 59 | +``` |
| 60 | +> [!Important] |
| 61 | +> To run this script successfully, ensure you have Contributor + User Access Admin or Owner access on all subscriptions in the list. See [steps to assign Azure roles](../../role-based-access-control/role-assignments-steps.md). |
| 62 | +
|
| 63 | +8. Run the script uploaded from step 6 using the command: |
| 64 | + * If ```$subscriptions``` was set: |
| 65 | +```PowerShell |
| 66 | +.\AMS_AIOPS_SETUP.ps1 -ArmId $armId -subscriptions $subscriptions |
| 67 | +``` |
| 68 | + * If ```$subscriptions``` wasn't set: |
| 69 | +```PowerShell |
| 70 | +.\AMS_AIOPS_SETUP.ps1 -ArmId $armId |
| 71 | +``` |
| 72 | + |
| 73 | +### Unprotect the GetEnvironment method |
| 74 | + |
| 75 | +Follow steps to unprotect methods from the [NetWeaver provider configuration page](provider-netweaver.md#prerequisite-unprotect-methods-for-metrics). |
| 76 | +<br/>If you have already followed these steps during Netweaver provider setup, you can skip this section. Ensure that you have unprotected the GetEnvironment method in particular for this capability to work. |
| 77 | + |
| 78 | +> [!Important] |
| 79 | +> You might have to wait for up to 2 hours for your AMS to start receiving metadata of the infrastructure that it needs to monitor. |
| 80 | +
|
| 81 | +## Using Insights on Azure Monitor for SAP Solutions(AMS) |
| 82 | +We have two categories of issues we help you get insights for. |
| 83 | +* [Availability issues](#availability-insights) |
| 84 | +* [Performance degradations](#performance-insights) |
| 85 | + |
| 86 | +> [!Important] |
| 87 | +> As a user of the Insights capability, you will require reader access on all virtual machines on which the SAP systems are hosted that you're trying to monitor using AMS. This is to make sure that you're able to view Azure monitor metrics and Resource health events of these virtual machines in context of SAP issues. See [steps to assign Azure roles](../../role-based-access-control/role-assignments-steps.md). |
| 88 | +
|
| 89 | +### Availability Insights |
| 90 | +This capability helps you get an overview regarding availability of your SAP system in one place. You can also correlate SAP availability with Azure platform VM availability and its health events easing the overall root-causing process. |
| 91 | + |
| 92 | +#### Steps to use availability insights |
| 93 | +1. Open the AMS instance of your choice and visit the insights tab under Monitoring on the left navigation pane. |
| 94 | +:::image type="content" source="./media/enable-sap-insights/visit-insights-tab.png" alt-text="Screenshot that shows the landing page of Insights on AMS."::: |
| 95 | +1. If you have followed all [the steps mentioned](#steps-to-enable-insights-in-azure-monitor-for-sap-solutions), you should see the above screen asking for context to be set up. You can set the Time range, SID and the provider (optional, All selected by default). |
| 96 | +1. On the top, you're able to see all the fired alerts related to SAP system and instance availability on this screen. |
| 97 | +:::image type="content" source="./media/enable-sap-insights/availability-overview.png" alt-text="Screenshot of the overview page of availability insights."::: |
| 98 | +1. If you're able to see SAP system availability trend, categorized by VM - SAP process list. If you have selected a fired alert in the previous step, you're able to see these trends in context with the fired alert. If not, these trends respect the time range you set on the main Time range filter. |
| 99 | +:::image type="content" source="./media/enable-sap-insights/availability-trends.png" alt-text="Screenshot of the availability trends of availability insights."::: |
| 100 | +1. You can see the Azure virtual machine on which the process is hosted and the corresponding availability trends for the combination. To view detailed insights, select the Investigate link. |
| 101 | +1. It opens a context pane that shows you availability insights on the corresponding virtual machine and the SAP application. |
| 102 | +It has two categories of insights: |
| 103 | + * Azure platform: VM health events filtered by the time range set, either by the workbook filter or the selected alert. This pane also consists of VM availability metric trend for the chosen VM. |
| 104 | + :::image type="content" source="./media/enable-sap-insights/availability-vm-health.png" alt-text="Screenshot of the VM health events of availability insights."::: |
| 105 | + * SAP Application: Process availability and contextual insights on the process like error messages (SM21), Lock entries (SM12) and Canceled jobs (SM37) which can help you find issues that might exist in parallel in the system, at the point in time. |
| 106 | + |
| 107 | +### Performance Insights |
| 108 | +This capability helps you get an overview regarding performance of your SAP system in one place. You can also correlate key SAP performance issues with related SAP application logs alongside Azure platform utilization metrics and SAP workload configuration drifts easing the overall root-causing process. |
| 109 | + |
| 110 | +#### Steps to use performance insights |
| 111 | +1. Open the AMS instance of your choice and visit the insights tab under Monitoring on the left navigation pane. |
| 112 | +1. On the top, you're able to see all the fired alerts related to SAP application performance degradations. |
| 113 | + :::image type="content" source="./media/enable-sap-insights/performance-overview.png" alt-text="Screenshot of the overview page of performance insights."::: |
| 114 | +1. Next you're able to see key metrics related to performance issues and its trend during the timerange you have chosen. |
| 115 | +1. To view detailed insights issues, you can either choose to investigate a fired alert or view insights for a key metric. |
| 116 | +1. On investigating, you see a context pane, which shows you four categories of metrics in context of the issue/key metric chosen. |
| 117 | + * Issue/Key metric details - Detailed visualizations of the key metric that defines the problem. |
| 118 | + :::image type="content" source="./media/enable-sap-insights/performance-detail-pane.png" alt-text="Screenshot of the context pane of performance insights."::: |
| 119 | + |
| 120 | + * SAP application - Visualizations of the key SAP logs that pertain the issue type. |
| 121 | + :::image type="content" source="./media/enable-sap-insights/performance-sap-platform-pane.png" alt-text="Screenshot of the SAP pane of performance insights."::: |
| 122 | + |
| 123 | + * Azure platform - Key Azure platform metrics that present an overview of the virtual machine of the SAP system. |
| 124 | + :::image type="content" source="./media/enable-sap-insights/performance-azure-pane.png" alt-text="Screenshot of the infrastructure pane of performance insights."::: |
| 125 | + |
| 126 | + * Configuration drift - [Quality checks](../center-sap-solutions/get-quality-checks-insights.md) violations on the SAP system. |
| 127 | +1. This capability with the set of metrics in context of the issue, helps you visually correlate trends of key metrics. This experience eases the root-causing process of performance degradations observed in SAP workloads on Azure. |
| 128 | + |
| 129 | +#### Scope of the preview |
| 130 | +We have insights only for a limited set of issues as part of the preview. We extend this capability to most of the issues supported by AMS alerts before this capability is Generally Available(GA). |
| 131 | +* Availability insights let you detect and troubleshoot unavailability of Netweaver system, instance and HANA DB. |
| 132 | +* Performance insights are provided for NetWeaver metrics - High response time(ST03) and Long running batch jobs. |
| 133 | + |
| 134 | +## Next steps |
| 135 | + |
| 136 | +- For information on providers available for Azure Monitor for SAP solutions, see [Azure Monitor for SAP solutions providers](providers.md). |
0 commit comments