Splunking Azure: Event Hubs

Event Hubs are a big data streaming PaaS capability provided by Azure. Event Hubs can process data or telemetry produced from your Azure environment. They also provide us a scalable method to get your valuable Azure data into Splunk!

Splunk add-ons like the Splunk Add-on for Microsoft Cloud Services and the Microsoft Azure Add-on for Splunk provide the ability to connect to, and ingest all kinds of data sources from your Azure environment. If you’re managing large Azure environments, this might require configuring dozens of inputs to ensure you are collecting data from all your subscriptions and resource groups.

By using Event Hubs, we can consolidate some of this effort by configuring logging in Azure to route to an Event Hub and off to your Splunk environment.

This blog covers everything you need to use Event Hubs as your delivery method for getting Azure data into Splunk!

Configuring an Azure Event Hub

1. In the Azure Portal: All Services > Event Hubs

2. Add

3. Create a new namespace

Note: A namespace is a scoping container for Event Hub topics. It provides a unique FQDN. A namespace serves as an application container that can house multiple Event Hub topics. For details around pricing tiers and throughput units, check out this FAQ

4. Add an Event Hub to your namespace

5. Assign a name for the Event Hub (Eg. Use the log type you intend to send - AAD, Tenant, Subscription logs etc)

Note: The number of partitions in an event hub directly relates to the number of concurrent readers you expect to have.

6. Select Shared access policies

7. Select RootManageSharedAccessKey

8. Store a copy of the Connection string-primary key. This is needed for the Splunk input.

Configuring Azure logging to Event Hub

Azure Active Directory Logs

Contain the history of sign-in activity and audit trail of changes made in the Azure Active Directory for a particular tenant.

1. All Services > Azure Active Directory

2. Select Diagnostic settings

3. Select Add diagnostic setting

4. Configure:

Azure Subscription Activity Logs

Provide insight into the operations on each Azure resource in the subscription from the outside (the management plane) in addition to updates on Service Health events. Use the Activity Log, to determine the what, who, and when for any write operations (PUT, POST, DELETE) taken on the resources in your subscription. There is a single Activity log for each Azure subscription.

1. All Services > Monitor

2. Select Activity log

3. Select Diagnostic settings

4. Select Add diagnostic setting

5. Configure:

Azure Resource Logs

Provide insight into operations that were performed within an Azure resource (the data plane), for example getting a secret from a Key Vault or making a request to a database. The content of resource logs varies by the Azure service and resource type.

1. Select a Resource in your subscription (for our example we’ll use the Event Hub we created)

2. Select Diagnostic settings

3. Select Add diagnostic setting

4. Configure:

Configure Splunk Event Hub Input

1. Install the Microsoft Azure Add-on for Splunk

2. Azure Add-on for Splunk > Inputs

3. Create New Input > Azure Event Hub

4. Configure:

Note: Transport Type AMQP uses ports 5671 & 5672 for communication. AMQP over WebSocket uses ports 80 & 443 - FAQ

Troubleshooting:  index=_internal  source="/opt/splunk/var/log/splunk/ta_ms_aad_azure_event_hub.log"

Using Event Hubs you can leverage a smaller set of Event Hub inputs in Splunk to capture a broad set of Azure data across multiple subscriptions and resource groups.

The great thing about using the Event Hub inputs is that all the data comes through in a clean JSON format, meaning that all our events are automatically field-extracted regardless of the source!

SignInLogs

Security Alerts

Service & Resource Health

Recommendations

Resource Metrics

Happy Splunking!
- Ry

Related Articles

Communicating Context Across Splunk Products With Splunk Observability Events
Platform
6 Minute Read

Communicating Context Across Splunk Products With Splunk Observability Events

Learn how Alert Actions and Adaptive Response can help you tie your Splunk, Enterprise Security, IT Service Intelligence and Observability data together.
Enhancements To Ingest Actions Improve Usability and Expand Searchability Wherever Your Data Lives
Platform
4 Minute Read

Enhancements To Ingest Actions Improve Usability and Expand Searchability Wherever Your Data Lives

Along with the respective Splunk Enterprise version 9.1.0 and Splunk Cloud Version 9.0.2305 releases, Ingest Actions has launched a new set of features and capabilities that improve its usability and expand on configurability of data routed by Ingest Actions to S3.
Deep Learning Toolkit 3.7 and 3.8 - What’s New?
Platform
3 Minute Read

Deep Learning Toolkit 3.7 and 3.8 - What’s New?

We are excited to share the latest advances around the Deep Learning Toolkit App for Splunk (DLTK). These include custom certificates, integration with Splunk Observability and a container operations dashboard, just to name a few.