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?
How do I connect kqlmagic to more than one Log Analytics workspace at the same time?
443 views Asked by gorzilla At
2
There are 2 answers
0
On
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
You have few options to achieve it.
(I am the author of Kqlmagic,)