Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
Refactor ALA-1 query to improve readability and maintainability
Browse files Browse the repository at this point in the history
  • Loading branch information
sebassem committed Apr 2, 2024
1 parent 760a903 commit 08edd82
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ resourcecontainers
| where type == 'microsoft.resources/subscriptions'
| project subscriptionAlerts=tostring(id),name,tags
| join kind=leftouter (
resources
| where type == 'microsoft.insights/activitylogalerts' and properties.condition contains "ServiceHealth"
| extend subscriptions = properties.scopes
| project subscriptions
| mv-expand subscriptions
| project subscriptionAlerts = tostring(subscriptions)
resources
| where type == 'microsoft.insights/activitylogalerts' and properties.condition contains "ServiceHealth"
| extend subscriptions = properties.scopes
| project subscriptions
| mv-expand subscriptions
| project subscriptionAlerts = tostring(subscriptions)
) on subscriptionAlerts
| where isempty(subscriptionAlerts1)
| project-away subscriptionAlerts1
Expand Down

0 comments on commit 08edd82

Please sign in to comment.