Reputation: 98
In my Jupyter notebook, I want to run the same KQL query against different Sentinel workspaces and compare the results as data frames. Is there an easy way to have multiple workspace connections at the same time or would I need to reconnect and query each workspace individually every time I change my KQL query?
Upvotes: 0
Views: 533
Reputation: 151
You have few options to achieve it.
(I am the author of Kqlmagic,)
Upvotes: 3
Reputation: 1595
See if cross-workspace queries satisfy your requirements. And a bit more documentation here. Cross-workspace queries are for exactly you describe. You use a union
operator to link both - similar to how you would link two tables using union
.
Snipped from the article:
workspace('<workspace-A>').SecurityEvent
| union workspace('<workspace-B>').SecurityEvent
Upvotes: 1