Triage and Remediation
Remediation
Using Console
Using Console
To remediate the “Monitor System Updates setting is not enabled” misconfiguration in Azure using the Azure console, follow these steps:
- Log in to the Azure portal (https://portal.azure.com/).
- Navigate to the virtual machine that needs to be remediated.
- Click on the “Security” tab in the left-hand menu.
- Click on the “Security Center” link.
- This will open the Azure Security Center. Click on the “Recommendations” tab.
- Find the recommendation “Enable monitoring of system updates on virtual machines” and click on it.
- This will open the recommendation details page. Click on the “Remediate” button.
- In the “Remediate recommendation” window, select the virtual machine that needs to be remediated and click on the “Remediate” button.
- Wait for the remediation to complete. This may take several minutes.
- Once the remediation is complete, refresh the page to ensure that the “Monitor System Updates” setting is now enabled.
Using CLI
Using CLI
To remediate the “Monitor System Updates setting is not enabled” misconfiguration in Azure using Azure CLI, follow the steps below:
- Open the Azure CLI on your local machine or in the Azure Portal.
-
Run the following command to check the current status of the “Monitor System Updates” setting:
Replace
<resource-group-name>
and<vm-name>
with the name of the resource group and virtual machine that you want to check. -
If the “Monitor System Updates” setting is not enabled, run the following command to enable it:
Replace
<resource-group-name>
and<vm-name>
with the name of the resource group and virtual machine that you want to remediate. - Once the command is executed successfully, the “Monitor System Updates” setting will be enabled for the virtual machine.
Using Python
Using Python
To remediate the “Monitor System Updates setting is not enabled” misconfiguration in Azure using Python, you can use the Azure SDK for Python. Here are the step by step instructions:
-
Install the Azure SDK for Python using the following command:
-
Authenticate with Azure using your Azure credentials. You can use the following code to authenticate:
-
Get the current configuration for the Monitor System Updates setting using the following code:
-
If the “Log Analytics Solution Enabled” value is False, then the Monitor System Updates setting is not enabled. To remediate this, you can enable the setting using the following code:
Replace
<your workspace ID>
with the ID of your Log Analytics workspace. - After running the remediation code, you can verify that the setting is enabled by running the code in step 3 again and checking that the “Log Analytics Solution Enabled” value is True.