An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
Hello SujinaSJ-1789 Approach 1 (Event Hub) is the Microsoft-recommended pattern, but you don't actually need the Azure Function in the middle. The cleaner and officially documented path is:
Diagnostic settings → Azure Event Hub → Splunk Add-on for Microsoft Cloud Services (running on your Heavy Forwarder VM)
This is exactly what Microsoft documents for Entra ID and Azure Monitor data going into Splunk:
- Stream Azure monitoring data to an event hub and external partners – Microsoft Learn [learn.microsoft.com]
- Stream Microsoft Entra logs to an event hub (Splunk section) – Microsoft Learn [learn.microsoft.com]
- Access activity logs in Microsoft Entra ID – Microsoft Learn [learn.microsoft.com]
The Microsoft Entra doc explicitly says:"To use this feature, you need the Splunk Add-on for Microsoft Cloud Services" and shows the mscs:azure:eventhub sourcetype used to query the logs in Splunk.
Note on the GitHub repo you referenced (Microsoft/AzureFunctionforSplunkVS / AzureMonitorAddonForSplunk): that project is archived and still depends on Python 2.7, and Microsoft themselves state it is "Open Source and not an officially supported Microsoft product".
It's best to avoid it for new deployments.
Steps for the recommended flow (all four log types):
- Create the Event Hub namespace and hub in the same region as your workloads. Microsoft's guidance: start with 4 partitions, at least 7 days retention, and open outbound TCP 5671/5672 (AMQP) from the consumer.
- Route the logs using diagnostic settings:
- Activity log → Azure Monitor → Activity log → Export Activity Logs → Stream to an event hub
- Resource logs (incl. NSG flow logs via NSG diag settings) → per-resource Diagnostic settings → Stream to an event hub
- Entra ID (sign-in + audit + provisioning logs) → Entra ID → Monitoring & health → Diagnostic settings → Stream to an event hub.
- Deploy the Heavy Forwarder VM in Azure and install the Splunk Add-on for Microsoft Cloud Services.
- Register an app in Microsoft Entra ID and grant it the Azure Event Hubs Data Receiver role on the Event Hub — this is the auth path the add-on uses.
- Configure the Event Hub input in the add-on with the namespace FQDN, event hub name, consumer group, and the app credentials. Splunk's official guidance is one input per partition (e.g., 4 partitions → 4 inputs).
- Verify in Splunk with:
You can filter Entra data withsourcetype="mscs:azure:eventhub"body.records.category=AuditLogs,SignInLogs, etc., as shown in Microsoft's Entra doc.
About Approach 2 (Heavy Forwarder pulling from Storage Account)
It is technically feasible using the same Splunk Add-on for Microsoft Cloud Services, which supports Azure Storage Blob and Table inputs — no custom code needed.
Steps in short:
- In each Diagnostic setting, additionally select Archive to a storage account for the log categories you need.
- On the Heavy Forwarder, in the add-on, add an Azure Storage Account connection with the account name + access key (or SAS).
- Configure a Storage Blob (and/or Storage Table) modular input pointing to the container/prefix Azure creates (e.g.,
insights-logs-*,insights-activity-logs).
Direct caution from Splunk's official docs for this approach:"the number of inodes available can fill up quickly, creating pointer files on your operating system for every single blob… potentially resulting in a 'no space left on device' error." This is a real concern for high-volume sources like NSG flow logs.
Recommendation: If the primary use case is SIEM / security monitoring on Activity, Resource, NSG Flow, and Entra ID logs, go with Approach 1 — Event Hub + Splunk Add-on for Microsoft Cloud Services (skip the Azure Function; the add-on pulls from the Event Hub directly). It's the pattern Microsoft explicitly documents and it's near real-time. Reserve Approach 2 only if you need cheap long-term archival and can tolerate ingestion delays.
Hope this helps!
Thanks,
Suchitra.