Skip to content

Cost Optimization VBD: Add Service Group filter to sub-template workbooks#3147

Open
arthurclares wants to merge 6 commits into
microsoft:masterfrom
arthurclares:costoptimization-march-update
Open

Cost Optimization VBD: Add Service Group filter to sub-template workbooks#3147
arthurclares wants to merge 6 commits into
microsoft:masterfrom
arthurclares:costoptimization-march-update

Conversation

@arthurclares
Copy link
Copy Markdown
Contributor

Summary

This PR adds Service Group filtering support to the 6 sub-template workbooks referenced by the main Cost Optimization workbook. Each workbook's KQL queries now include a leftouter join against microsoft.relationships/servicegroupmember relationship resources, allowing users to scope results to a specific Service Group when the {ServiceGroup} parameter is set. When the parameter is empty, the filter is a no-op and all results are returned as before.

Modified workbooks:

AHB/AHB.workbook
Compute/Compute.workbook
Databases/Databases.workbook
Networking/Networking.workbook
Storage/Storage.workbook
Top10Services/Top10Services.workbook

The filter pattern appended to each query is:

| join kind=leftouter (relationshipresources | where type == 'microsoft.relationships/servicegroupmember' | where properties.TargetId =~ '{ServiceGroup}' | project _sgFilterId = tostring(properties.SourceId) | distinct _sgFilterId) on $left.<id> == $right._sgFilterId | where '{ServiceGroup}' == '' or isnotempty(_sgFilterId) | project-away _sgFilterId

Screenshots

  • If you added a template to a gallery, show a screenshot of it in the gallery view (which verifies its shows up where you expected).

    It is also good to show a screenshot of template content, so people can see what you expect it to look like, compared to what they see when they might run it themselves.

Validation

  • Validate your changes using one or more of the testing methods.

    Make sure you've tested your template content. Fixing things while in PR is trivial. Hotfixing it later is very expensive; at the current time at least 3 teams are involved in a hotfix!

Checklist

  • If you are adding a new template, gallery, or folder, add your team and folder/file(s) to the CODEOWNERS file at the root of the repo. CODEOWNERS entries should be teams, not individuals.
    When done correctly, this means that from then on your team does reviews of your things, not the workbooks team.
  • Ensure all steps in your template have meaningful names.
  • Ensure all parameters and grid columns have display names set so they can be localized.

- Merged 5 decision inbox entries into decisions.md (6 new decisions)
- Added session log for v2 workbook assembly
- Squad artifacts: agent charters/histories, ceremonies, routing, team config
- Work done: 26 KQL queries with SG filters, complete workbook in 7 groups
- All queries validated (26/26 pass), workbook structure validated
@arthurclares arthurclares requested review from a team as code owners March 5, 2026 11:03
Copy link
Copy Markdown

@milesyuhas milesyuhas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants