Skip to main content

Triage and Remediation

Remediation

Using Console

To remediate the “Monitor System Updates setting is not enabled” misconfiguration in Azure using the Azure console, follow these steps:
  1. Log in to the Azure portal (https://portal.azure.com/).
  2. Navigate to the virtual machine that needs to be remediated.
  3. Click on the “Security” tab in the left-hand menu.
  4. Click on the “Security Center” link.
  5. This will open the Azure Security Center. Click on the “Recommendations” tab.
  6. Find the recommendation “Enable monitoring of system updates on virtual machines” and click on it.
  7. This will open the recommendation details page. Click on the “Remediate” button.
  8. In the “Remediate recommendation” window, select the virtual machine that needs to be remediated and click on the “Remediate” button.
  9. Wait for the remediation to complete. This may take several minutes.
  10. Once the remediation is complete, refresh the page to ensure that the “Monitor System Updates” setting is now enabled.
Following these steps will remediate the “Monitor System Updates setting is not enabled” misconfiguration in Azure using the Azure console.

To remediate the “Monitor System Updates setting is not enabled” misconfiguration in Azure using Azure CLI, follow the steps below:
  1. Open the Azure CLI on your local machine or in the Azure Portal.
  2. 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.
  3. 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.
  4. Once the command is executed successfully, the “Monitor System Updates” setting will be enabled for the virtual machine.
Note: The Azure Security Center must be enabled for the subscription and the virtual machine for this remediation to work.
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:
  1. Install the Azure SDK for Python using the following command:
  2. Authenticate with Azure using your Azure credentials. You can use the following code to authenticate:
  3. Get the current configuration for the Monitor System Updates setting using the following code:
  4. 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.
  5. 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.
There is no dedicated Terraform argument to toggle “Monitor System Updates” directly on a security center resource; it is controlled via a policy/initiative assignment, so you must attach the correct built‑in (or custom) policy that enables this recommendation and set its parameter(s) accordingly in parameters.This change updates the existing assignment in place (no forced replacement) as long as name and scope stay the same; only the policy and/or parameters will change.To verify, terraform plan should show an update to the azurerm_policy_assignment.monitor_system_updates resource with changes to policy_definition_id and/or parameters, and no resources marked -/+ (destroy/create).