Enhanced Monitoring Agent for SAP workloads in Azure - Fix for a common issue

@20aman    Jan 20, 2022

If you have followed our previous blog to validate and troubleshoot the SAP enhanced monitoring extension in Azure and are facing an issue where the extension gets installed and shows as provisioning succeeded but still doesn't integrate with the SAP system. When you run dump ccm for the SAP OS Collector you get the status as "False" for the "Enhanced Monitoring Access".

If you want to review the previous troubleshooting and validation blog you can visit the same here: Troubleshooting & Validating - Enhanced Monitoring Agent for SAP workloads in Azure

Easy fix

The easy fix for this is to restart the SAP Host Agent. Just run the below commands (as a user with root authorization) to restart the saphostexec process:

./saphostexec -restart 

Now validate the integration status again by running the below commands:

cd /usr/sap/hostctrl/exe
./saposcol -d
dump ccm

The status should now be set to True for the "Enhanced Monitoring Access".

Problem with the Easy Fix

The problem that you may encounter is that when you reboot the VM, there are chances that the status can again switch back to False. The potential reason for this is that the SAP OS Collector becomes ready first before the Azure Enhanced Monitoring agent becomes ready. This causes the issue as the SAP OS Collector reports that the extension is not available even though it is installed. This is why restarting the host agent fixes the issue temporarily.

Permanent Resolution

The recommendation is to increase the Azure Extension wait time to 6 minutes. To set the wait time to 6 minutes, the below environment is needed to be set.

SAPOSCOL_AZURE_EXTENSION_WAITTIME=360

Run the below command to set the environment variable:

echo "export SAPOSCOL_AZURE_EXTENSION_WAITTIME=360" >> /etc/profile

This would update the system-wide profile.

Let us know if this fixed your issue. If you found alternate fixes, please post those in the comments below.





Comments powered by Disqus