The following example assumes that you have already set up Microsoft Defender
and Microsoft Defender XDR, for example, by following the official
documentation.
To stream security events from Defender in realtime, you can use Azure Event
Hub, which provides a Kafka endpoint starting at the Standard tier. Make sure to
enable Kafka Surface after the Event Hub setup.
In Microsoft Security Center, configure Streaming under System -> Settings ->
Microsoft Defender XDR -> General -> Streaming API. Add a new Streaming API for
the target Event Hub and enable all event types that you want to collect.
Tenzir's Kafka integration allows for seamless
consumption of Defender events. In the following pipeline,
replace all strings starting with YOUR_with the configuration values in Azure
under Event Hub Namespace -> Settings -> Shared access policies -> (Your
policy).
After replacing the configuration values, your pipeline may look like this: