Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

ALZ Monitor Customisation #241

Open
gerrynicol opened this issue Aug 29, 2023 · 3 comments
Open

ALZ Monitor Customisation #241

gerrynicol opened this issue Aug 29, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@gerrynicol
Copy link

HI there,

Possibly wrong forum for this (and have raised a ticket for this also) but I have been doing some customisation on the ALZ monitor bicep files to suit our requirements. One of theses is to define the actual alert rules you want included in an alert processing rule. See below for an example (under conditions). This works as expected, however, if I was then to go an add an additional alert rule name under the conditions and push it, the azure policy definition is updated, but the actual alert processing rule is not. The only way round this seems to be to delete the current assignment, the existing alert processing rules and action groups and redeploy. Is there an alternative to this approach that could be recommmended? I have a feeling that this level of customisation to select particular alert rules may be a good enhancement when ALZ monitor becomes part of the overall ALZ architecture.

                        type: 'Microsoft.AlertsManagement/actionRules'
                        apiVersion: '2021-08-08'
                        name: 'Alz Alert Processing Rule - ServiceHealth'
                        location: 'global'
                         dependsOn: [
                        '[concat(\'Microsoft.Insights/actionGroups/\', \'AlzActGrpSrv\')]'
                         ]
                         tags: {
                          _deployed_by_alz_monitor: true
                        }
                        properties: {
                          scopes: [
                            '[subscription().Id]'
                          ]
                          description: 'Alz Alert Processing Rule - ServiceHealth'
                          enabled: true
                          actions: [
                            {
                              actiongroupIds: [
                                '''[concat(subscription().Id, '/resourceGroups/', parameters('ALZMonitorResourceGroupName'), '/providers/Microsoft.Insights/actionGroups/AlzActGrpSrv')]'''
                              ]
                              actionType: 'AddActionGroups'
                            }
                          ]
                          conditions: [
                            {
                              field: 'AlertRuleName'
                              operator: 'Equals'
                              values: [
                                'ServiceHealthAdvisoryEvent'
                                'ServiceHealthIncident'
                                'ServiceHealthPlannedMaintenance'
                                'ServiceHealthSecurityIncident'
                              ]
                            }
@arjenhuitema
Copy link
Collaborator

Hello @gerrynicol, you are in the correct place, and thank for your feedback. We will review the enhancement you suggested and keep you posted.

@arjenhuitema arjenhuitema added the enhancement New feature or request label Sep 1, 2023
@arjenhuitema arjenhuitema self-assigned this Sep 4, 2023
@paulgrimley
Copy link
Contributor

@gerrynicol thanks for sharing this, we will look to investigate this in October.

@paulgrimley
Copy link
Contributor

@gerrynicol we're archiving this repo, please could you add an issue on our new repo https://github.com/Azure/azure-monitor-baseline-alerts/issues as we unfortunately cannot transfer issues between repos.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants