Skip to content

Team Cymru Scout: migrate playbooks from the HTTP Data Collector API to the Logs Ingestion API - #15101

Open
jstraney-tc wants to merge 5 commits into
Azure:masterfrom
jstraney-tc:feature/scout-playbooks-logs-ingestion
Open

jstraney-tc wants to merge 5 commits into
Azure:masterfrom
jstraney-tc:feature/scout-playbooks-logs-ingestion

Conversation

@jstraney-tc

Copy link
Copy Markdown

Change(s)

Migrates the two Team Cymru Scout playbooks that still ingest through the HTTP Data Collector API over to the Logs Ingestion API:

  • TeamCymruScoutLiveInvestigation — 21 ingestion actions
  • TeamCymruScoutEnrichIncident — 6 ingestion actions

Every ApiConnection action posting to /api/logs through the azureloganalyticsdatacollector managed connector is now an Http action posting to a data collection rule stream, authenticated with the playbook's system-assigned managed identity.

Both templates now provision what they write to, so nothing is left for the operator to wire up by hand:

Resource added LiveInvestigation EnrichIncident
Microsoft.Insights/dataCollectionEndpoints 1 1
Microsoft.OperationalInsights/workspaces/tables 21 6
Microsoft.Insights/dataCollectionRules 1 (21 streams) 1 (6 streams)
Microsoft.Authorization/roleAssignments — Monitoring Metrics Publisher, scoped to the DCR 1 1

The data collector connection resource, its ARM variable, its dependsOn entry and its $connections entry are removed. TeamCymruScoutCreateIncidentAndNotify writes no logs and is unchanged.

Two commits. The first is a formatting-only normalization of the two templates — TeamCymruScoutEnrichIncident/azuredeploy.json had been serialized by PowerShell's ConvertTo-Json, which made any content change unreadable in a diff. It is split out so the migration itself can be reviewed on its own, and is verified to be a semantic no-op: both files parse to structures identical to their previous contents.

Reason for Change(s)

Support for the HTTP Data Collector API ends 2026-09-14 (migration guidance). This solution's Azure Function data connector was already moved to the Logs Ingestion API in an earlier release, but these two playbooks were not, and they account for all remaining Data Collector API usage in the solution.

Version Updated

Yes — solution 3.1.14.0.0, with a ReleaseNotes.md entry.

Major rather than minor because existing workspaces need a one-way table conversion before the migrated playbooks can write.

Compatibility

Column names and types are unchanged, so the 17 parsers and the workbook that read these tables keep working without modification. The DCR transforms project the raw Scout API fields onto the existing _s/_d/_b/_g column names, reproducing the flattening the Data Collector API applied implicitly (local.iplocal_ip_s) along with the ip/query/rank fields the playbooks graft on before ingesting.

Tables created by the old API are classic tables and must be converted once per workspace before the migrated playbooks run. Both playbook READMEs and the post-deployment metadata document the az monitor log-analytics workspace table migrate command and state that the conversion cannot be undone.

Testing Completed

No — opened as a draft pending deployment validation.

Verified statically:

  • All templates parse; zero azureloganalyticsdatacollector, Log-Type or /api/logs references remain
  • DCR stream declarations ↔ dataFlows ↔ outputStreams ↔ table resources are consistent in both directions
  • Every transform emits only columns declared on its destination table, and reads only columns declared on its stream
  • Diffing the workflow definitions against the previous commit shows exactly the 27 ingestion actions changed, with no actions added or removed
  • The rules in .script/playbooksValidator.tsPlaybookName parameter, single main workflow, resource-group location, mandatory metadata fields, valid entity types — pass for all three playbooks

Not yet done, and the reason this is a draft:

  • Deployment to a Sentinel workspace
  • End-to-end ingestion and a parser regression check against live data

The destination column names were derived from this solution's own parsers and from the playbooks' ParseJson schemas rather than from a live workspace, so confirming them against <Table>_CL | getschema is the main outstanding item. Will move this out of draft once that is done.

Checked that the validations are passing

Partially. The repo's Node validators could not be run locally (node_modules not installed), so the playbooksValidator rules were replicated and checked directly, as listed above. Package/ has not been regenerated — PowerShell was unavailable — so /package will be needed.

🤖 Generated with Claude Code

jstraney-tc and others added 2 commits September 10, 2026 14:24
TeamCymruScoutEnrichIncident/azuredeploy.json was serialized by PowerShell's
ConvertTo-Json (two spaces after the key separator, inline arrays), which makes
any subsequent content change unreadable in a diff. Re-serialize both playbook
templates as 4-space JSON with literal Unicode, matching the style
TeamCymruScoutLiveInvestigation already used.

No semantic change: both files parse to structures identical to their previous
contents. Split out from the following commit so the Logs Ingestion API
migration can be reviewed on its own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Support for the HTTP Data Collector API ends 2026-09-14. The Azure Function data
connector already ingests through a DCR, but the TeamCymruScoutLiveInvestigation
and TeamCymruScoutEnrichIncident playbooks still posted to /api/logs through the
azureloganalyticsdatacollector managed connector: 21 and 6 actions respectively.

Each of those 27 actions now POSTs to a data collection rule stream, authenticated
as the playbook's own system-assigned managed identity. Both templates provision
what they write to -- a data collection endpoint, the destination tables, one DCR
with a stream and transform per table, and a Monitoring Metrics Publisher role
assignment scoped to that DCR -- so no manual wiring is left to the operator. The
data collector connection resource, its ARM variable, its dependsOn entry and its
$connections entry are all removed.

Column names and types are unchanged, so the 17 parsers and the workbook that read
these tables keep working. The transforms project the raw Scout API fields onto the
existing _s/_d/_b/_g column names, including the nested paths the old API flattened
with underscores (local.ip -> local_ip_s) and the ip/query/rank fields the playbooks
graft on before ingesting.

Tables created by the old API are classic tables and must be converted once per
workspace before the migrated playbooks run. Both playbook READMEs and the
post-deployment metadata document the az monitor log-analytics workspace table
migrate command and note that the conversion is one-way.

Solution version 3.1.1 -> 4.0.0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@v-atulyadav
v-atulyadav requested a lite review from Copilot September 11, 2026 04:18
@v-atulyadav v-atulyadav added the Solution Solution specialty review needed label Sep 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note

Copilot was unable to run its full agentic suite in this review.

Pull request overview

Updates the Team Cymru Scout solution metadata and playbook documentation to support the migration from the retired HTTP Data Collector API to the Azure Monitor Logs Ingestion API, and bumps the solution version accordingly.

Changes:

  • Bumped solution version to 4.0.0 and updated publish metadata.
  • Added release note entry for the playbook ingestion migration.
  • Updated both playbook READMEs with Logs Ingestion API guidance and classic-table migration instructions.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Solutions/Team Cymru Scout/SolutionMetadata.json Updates last publish date metadata.
Solutions/Team Cymru Scout/ReleaseNotes.md Adds 4.0.0 entry documenting the migration.
Solutions/Team Cymru Scout/Playbooks/TeamCymruScoutLiveInvestigation/README.md Documents Logs Ingestion API behavior and classic-table migration steps.
Solutions/Team Cymru Scout/Playbooks/TeamCymruScoutEnrichIncident/README.md Documents Logs Ingestion API behavior and classic-table migration steps.
Solutions/Team Cymru Scout/Data/Solution_TeamCymruScout.json Bumps solution version to 4.0.0.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Solutions/Team Cymru Scout/Playbooks/TeamCymruScoutEnrichIncident/README.md Outdated
Comment thread Solutions/Team Cymru Scout/Playbooks/TeamCymruScoutLiveInvestigation/README.md Outdated
@jstraney-tc

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree [company="Team Cymru"]

@jstraney-tc

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Team Cymru"

@v-skharode

Copy link
Copy Markdown
Contributor

Could you please verify the table migration examples in both README files? The placeholder --table-name "_CL" may cause users to append _CL twice if the table list command already returns the full table name. Clarifying the expected input would help avoid migration issues.

@v-skharode
v-skharode marked this pull request as ready for review September 15, 2026 13:02
@v-skharode
v-skharode requested review from a team as code owners September 15, 2026 13:02
The `table list` command returns the full table name including the _CL
suffix, but the migrate example used a `<TableName>_CL` / `<Table>_CL`
placeholder, leading users to append _CL twice (e.g.
Communication_Data_CL_CL) and fail the migration. Use the name exactly
as listed and note the _CL suffix is already included, in both playbook
READMEs and their azuredeploy.json post-deployment metadata.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jstraney-tc

Copy link
Copy Markdown
Author

v-skharode thanks for the review. Confirming the table names and the migration example:

  • The table names themselves are correct. Both playbooks write to _CL custom tables (Communication_Data_CL, Domain_Data_CL, etc.), and each README lists the full set the playbook writes. Those are unchanged from the previous Data Collector API version, so the 17 parsers and the workbook keep reading them without modification.

  • The migration example was the issue you (and Copilot) flagged, and it's now fixed. az monitor log-analytics workspace table list returns the full name including the _CL suffix, but the migrate example used a <TableName>_CL placeholder, which would have led to a doubled suffix (Communication_Data_CL_CL) and a failed migration. Both READMEs and the post-deployment metadata in each azuredeploy.json now use --table-name "<TableName>" and explicitly say to use the name exactly as returned by table list / listed in the README, since it already includes _CL.

Pushed in the latest commit. Let me know if you'd like any further wording changes.

@v-skharode

Copy link
Copy Markdown
Contributor

Thanks for the clarification and update. I verified the latest changes locally and confirmed the migration example now uses the correct table name returned by the table list command, avoiding the duplicate _CL suffix issue. The concern has been addressed.

@v-skharode v-skharode closed this Sep 15, 2026
v-skharode
v-skharode previously approved these changes Sep 15, 2026
@v-atulyadav v-atulyadav reopened this Sep 16, 2026
@v-skharode

Copy link
Copy Markdown
Contributor

I have a couple of follow-up questions:

The solution version has been updated from 3.1.1 to 4.0.0. Could you please clarify the reason for a major version bump rather than a patch/minor version update (for example, 3.1.2)?

I am unable to locate the updated package file/artifact associated with this version change in the PR. Could you please confirm whether the package was regenerated and included as part of this update?

@v-skharode

Copy link
Copy Markdown
Contributor

Follow-up:
We are awaiting your response to the review comments shared earlier. Please provide an update on the requested clarifications and changes so that we can proceed with the review.

Change the solution version from 4.0.0 to 3.1.2 (patch) per Microsoft
review feedback, and regenerate the solution package with the V3
packaging tool so the migrated playbooks are reflected in the artifact:
add Package/3.1.2.zip and update Package/mainTemplate.json.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jstraney-tc

Copy link
Copy Markdown
Author

Thanks for the follow-up. Responses to both:

  1. Version: agreed a major bump wasn't warranted. This change only migrates two playbooks to the Logs Ingestion API, so I've set the solution version to 3.1.2 (a patch over the published 3.1.1) rather than 4.0.0.

  2. Package: you're right, the package hadn't been regenerated. I re-ran the V3 packaging tool and committed the regenerated artifacts, Package/3.1.2.zip and the updated Package/mainTemplate.json. Version 3.1.2 is now consistent across the solution, workbook, and playbook resources.

Both are in the latest commit. Let me know if you'd like any other changes.

@v-skharode

Copy link
Copy Markdown
Contributor

Thanks for addressing the previous feedback. I noticed that the ARM-TTK validation is still failing on "apiVersions Should Be Recent In Reference Functions". The template appears to reference Microsoft.Logic/workflows API version 2017-07-01, which is being flagged as outdated by the validation. Could you please review the ARM-TTK failure and update accordingly?

ARM-TTK's "apiVersions Should Be Recent In Reference Functions" test
fails on the role-assignment principalId lookup in the two migrated
playbooks, which referenced Microsoft.Logic/workflows with the outdated
2017-07-01 API version. Update the reference() calls and the workflow
resources themselves to 2019-05-01, the latest stable version, in both
TeamCymruScoutEnrichIncident and TeamCymruScoutLiveInvestigation, and
regenerate the 3.1.2 package. The untouched CreateIncidentAndNotify
playbook is left as is.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jstraney-tc

Copy link
Copy Markdown
Author

v-skharode thanks for catching this. Fixed in the latest commit:

  • The role-assignment principalId lookup in both migrated playbooks (TeamCymruScoutEnrichIncident and TeamCymruScoutLiveInvestigation) referenced Microsoft.Logic/workflows with API version 2017-07-01 inside the reference() call, which is what "apiVersions Should Be Recent In Reference Functions" was flagging. Both now use 2019-05-01, the latest stable Logic Apps API version.
  • I also updated the apiVersion on the Microsoft.Logic/workflows resource declarations in those two playbooks to 2019-05-01 for consistency.
  • The 3.1.2 package was regenerated with the V3 packaging tool, so Package/mainTemplate.json and Package/3.1.2.zip include the fix. The solution version stays at 3.1.2.

I ran Test-AzTemplate against the regenerated package locally and "apiVersions Should Be Recent In Reference Functions" now passes. Let me know if anything else comes up.

@jstraney-tc

Copy link
Copy Markdown
Author

I see there's a few checks that have failed, but I'm not certain it's anything from the open PR — the JSON File Syntax Validation and Playbook Validation jobs both appear to have hit a GitHub API rate limit (403) before validating any files. Could you please rerun the pipeline? Is there anything additional needed from my side?

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

Labels

Solution Solution specialty review needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants