Azure-Sentinel: Manually ASIM Deployment - Failed to validate, Conflict
Describe the bug Upon trying to deploy ASIM parsers via the ‘Deploy to Azure’ button and filling out the required parameters, a ‘Conflict’ error appears with the following error: (workspace, location and resource group have been omitted)
The resource '<SENTINELWORKSPACE> already exists in location <LOCATION> in resource group <RESOURCEGROUP>. A resource with the same name cannot be created in location <LOCATION>. Please select a new resource name.
Upon giving it a different name, it creates a new LAW in the designated resource group.
To Reproduce Steps to reproduce the behavior:
- Go to list of parsers https://github.com/Azure/Azure-Sentinel/tree/master/ASIM
- Deploy any of them
- Fill out the workspace name in the ‘Workspace’ field and pick the correct resource group containing the LAW
- Deploy
Expected behavior The parsers should deploy into the targeted workspace and become available for query.
Screenshots
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Edge
- Version: 115
Additional context I have all required permissions to deploy this content.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 23 (20 by maintainers)
The root cause of the issue is that each parser deployment script deploys the Log Analytics workspace before deploying the saved search. The conflict happens when tens of parser deployment ARM templates are trying to deploy the Log Analytics workspace at the same time.
The current version of ASIM parser deployment could create a new Log Analytics workspace, which could be unwanted behavior. I would expect the ASIM parser deployment ARM template only to create parsers for the already existing Log Analytics workspace and not create another one if I, for example, type the workspace name wrong into the template.
The issue does not relate to the existing versions of the ASIM parsers, as I have seen this issue occur when deploying the ASIM parsers for the first time to a given Log Analytics workspace. The error messages always refer to the workspace, which is constantly redeploying itself by the referenced ARM templates. Also, the referenced parser templates always seem to define
"etag": "*", meaning they always overwrite the existing resource.I made an example commit on how the issue could be solved by only verifying the Log Analytics workspace exists by declaring the workspace as an existing resource: 0986d7f
@vakohl, what do you think of this solution? Would you like me to implement it for the other parsers as well, or would you prefer to tackle the issue in-house?
Sorry to add to the noise, but I’m having the exact same problem. Tried deploying all ASIM parsers and then just one-by-one, same error message “Conflict”
I’ve tried putting the LAW in Australia Southeast and the LAW in Australia East, and also putting them in the same region, no difference to the output.
Drilling into the error message isn’t any more help, just states eTAG for specific error was outdated
newer data exists. If you are using eTag please use the latest one and try again in a few minutes. Operation Id: ‘4918a525df68776dd0a7063aaa6db6dd’ (Code: NewerDataExists)
Trying to redeploy multiple times to get other deployments to succeed does not help either.
Hi, This behavior is as expected due to the following reason. When deploying the ASIM parsers using the ARM templates a
POSTrequest is done at the background.Because the ASIM parsers already exists, this will result in an error as described above.
There are 2 workarounds to remediate this issue:
UPDATEmethod.It is more an issue related to Log Analytics than Microsoft Sentinel or ASIM as they are dependent on Log Analytics.
What I can do is create a PowerShell script that updates the ASIM parsers is they already exists and use the ASIM yaml files as input. Or create and ARM template that uses a Script Extension to run the PowerShell script in a different context.
This might need some extra permissions in the Azure Subscription / Resource Group but need to validate this first.
@rcegan @vakohl
Hi @rcegan, we are still waiting for update from concerned team, we will get back to you once there is an update.
Hi @rcegan, waiting for update from concerned team, once we receive an update will let you know.
Hi @rcegan, waiting for update from concerned team, once we receive an update will let you know.