Overview
Microsoft Azure Event Hubs is a real-time logging and data ingestion service integrated across the Microsoft Azure platform. Blumira integrates with Microsoft Azure Event Hubs to stream Azure cloud security event logs and alerts to the Blumira service for threat detection, alerting, and actionable response.
Required: An active Azure subscription is required for the Event Hubs integration.
Note: The Azure Event Hubs integration is a prerequisite to integrating with Microsoft Entra, Intune, 365 Defender, and Azure Monitor.
Before you begin
To connect Azure Event Hubs and send logs to Blumira from your supported data sources, complete the following steps:
Step | Details | Procedure |
1 |
Before proceeding with our AzShim script or the manual option, determine which method meets your logging needs. |
Deciding how to create the Event Hubs based on your logging needs |
2 |
Create a namespace and event hub, then gather these credentials for the Blumira Cloud Connector:
|
|
3 |
Configure Blumira using the credentials you gathered. |
|
4 |
(Optional) Start sending logs from other products through your event hub. |
Sending logs through an event hub to Blumira |
Deciding how to create the event hub based on your logging needs
Important: The script and the manual option to create an event hub do not set up logging for additional products like Entra ID, Intune, or Defender. Those product integrations must be configured separately after you have completed the Event Hubs integration in Blumira, regardless of which option you choose.
We provide two methods for setting up and gathering credentials for your Azure Event Hub. Refer to the scenarios below to determine which option best suits your logging needs.
Scenario | Recommendation |
I need logging for only one product, such as Microsoft Entra ID or 365 Defender. | AzShim script or manual configuration |
I do not have Azure resources that I require logging for. | AzShim script or manual configuration |
I have Azure resources I need to collect logs for in addition to logging from Entra, Intune, and Defender. |
The script automatically provisions Azure resources that are part of the Azure subscription, such as Azure platform logs, storage accounts, and key vaults. |
I have Azure resources in multiple regions. |
With the script, a new event hub will be created for each region, and each output from the script can be used as credentials for separate Cloud Connectors as needed. You can use the manual option instead, but it may require more effort. Note: This script only works for NA-based regions, and all other region support is subject to potential errors. |
Configuring Azure to obtain credentials
Running a script to create and obtain Event Hub credentials
You can use Blumira's AzShim script to automatically set up an event hub and obtain the necessary credentials for the Blumira Cloud Connector.
Note: You can run this script multiple times. When run again, the script will update resource diagnostic settings, if applicable. This will update logging configurations for Azure resources that were not enabled or present during the initial run. It still provides the connection string and event hub name in case you need to make any changes to the connector in-app.
To prepare a Cloud Shell and run the script:
- In Azure, launch Cloud Shell from the top navigation of the portal.
Note: This script must be run from a Bash shell with Azure CLI installed locally or through Azure Cloud Shell using Bash, which is our recommended method. - If this is the first time you are using Cloud Shell, you will be prompted to select Bash or Powershell.
- Click Create storage.
- (Optional) If you need a specialized or custom storage account, click Show advanced settings to customize the Cloud Shell configuration.
- Wait for the Cloud Shell to show “Succeeded” and verify that you are in the Bash environment (i.e., that Bash is selected in the environment dropdown in the left-hand side of the shell window) before proceeding with the steps below.
- In the Cloud Shell window, run this command:
git clone https://github.com/Blumira/AzShim.git
- After the successful clone, run the following separate commands:
cd ./AzShim
chmod +x ./AzShim.azcli
./AzShim.azcli -c
- Press the Enter key.
- Copy the primary connection string and the Event Hub Name for use in the Cloud Connector.
- Skip to the section Providing your Event Hub credentials to Blumira.
Manually configuring an Azure Event Hub
Configuring an Event Hubs namespace
Before configuring an event hub, you must create a namespace. To manually configure a namespace in Azure, do the following:
- Go to https://portal.azure.com/ and log in.
- Click Event Hubs.
- Click Add.
- On the Basics screen, under Project Details, complete the following fields:
- Select a Resource Group (or click Create new to add a new resource group option).
- Type a name for the event hub namespace (example: Blumiralogs).
- Select the Location and Pricing tier you want to use.
- (Optional) Add Availability Zone Features and Tags.
- Click Review + Create.
Configuring an Event Hub
Note: This step is not required for all types of logs. Some log sources automatically create their own event hub within the namespace you created above. Blumira recommends creating an event hub to provide clarity in your configurations, including when integrating Blumira with Microsoft Defender.
- In the Azure portal, click Event Hubs.
- Click on the event hub namespace you want to use for Blumira logs.
- Click Event Hubs
- Click + Event Hub to add a new event hub.
- Type an event hub name (example: blumira-log-stream).
- Select Create.
After Azure is done with the creation process, complete these steps to create a policy and key:
- Click on the event hub you just created.
- Click Shared access policies.
- Click + Add to add a new policy.
- Type a name, such as ReadOnlyAccessKey.
- Select the Listen check box.
- Click Create.
- In the Shared access policies list, click on the policy you just created.
- In the policy's detail window, copy and save the Connection string-primary key to use in Providing your Event Hub credentials to Blumira.
Providing your Event Hub credentials to Blumira
The Cloud Connector integration requires these Azure Event Hub credentials, which you gathered above:
- Connection string-primary key
- Event hub name
Cloud Connectors automate the configuration of your integrations without requiring you to use a sensor. After you obtain your integration's configuration parameters, you can then enable Blumira to collect your logs.
To configure the Blumira Cloud Connector:
- In the Blumira app, navigate to Settings > Cloud Connectors.
- Click + Add Cloud Connector.
- In the Available Cloud Connectors window, click the connector you want to add.
- In the Cloud Connector Name box, type a name to help identify the specific integration.
- Enter the credentials that you collected in the previous steps.
- Click Connect.
Sending logs through an event hub to Blumira
After configuring the Event Hubs Cloud Connector in Blumira, you can configure additional log sources to stream logs through the event hub to your Blumira Cloud Connector. Complete the procedures below for the applications that your organization uses:
Sending logs from Microsoft Entra ID
Microsoft Entra ID (formerly Active Directory) logs are critical to organizations that use Defender products or have active resources within Azure, such as a subscription. These logs are also recommended if the organization uses Conditional Access and other Entra resources. Sign-in logs, Entra alerts, and more are available from this integration.
Because Entra exists outside your Azure subscription, you must configure Entra separately to point to your Event Hub and Event Hub Namespace, which you created in previous steps.
Note: Entra can optionally create its own event hub called “insights-logs-audit.” If you prefer to use a different event hub, you must create it first using the procedure above.
To configure Entra to stream logs through your Blumira event hub, do the following:
- Log in to https://entra.microsoft.com/#home.
-
On the left-hand side, click Show more.
-
Click Audit Logs in the monitoring & health section of the left menu.
-
At the top, select Export Data Settings.
-
Click Add diagnostic setting.
-
Enter a name for this setting, such as “Blumira events“.
-
Select Stream to an event hub.
-
Click Event hub Configure.
-
Select your Blumira event hub namespace.
-
Select your Blumira event hub.
-
Use policy RootManageSharedAccessKey.
-
Click OK to save the event hub configuration.
-
In the Diagnostic setting window, under Logs, select the check box for all listed categories (AuditLogs, SignInLogs, etc).
Note: Categories appear in the list based on your Microsoft licensing level. -
Click Save (at the top).
Sending logs from Azure Monitor
There are two types of Azure platform logs collected with the Azure Monitor integration: Activity logs and Resource logs. These logs give you insight into the actions taken within your Subscription such as the creation, modification, and deletion of resources, as well as the use of Azure CLI and Azure Powershell. Resource logs can take a few different forms and are not supported on all Azure resources; for example, some Compute resources and Managed Disks do not have the ability to provide audit logs and security logs.
Note: If you used the script to automate the setup, Azure Monitor creates its own event hub called “insights-operational-logs”. You must still create an event hub namespace but can skip creating an event hub.
- Go to https://portal.azure.com/ and log in.
- Navigate to All Services > Subscriptions.
- Select the Azure subscription you want to monitor.
- Click Resource providers.
- Search for and select Microsoft.Insights.
- Click Register. (If already registered, move on to the next step.)
- Navigate back to the Azure subscription that you selected in Step 3.
- Click Activity Log.
- Click Export Activity Logs.
- Click Add Diagnostic Setting and complete these steps:
- Under Category details, click the check boxes next to all log types.
- Under Destination details:
- Click the Stream to an event hub check box.
- Select or verify the event hub's Subscription and namespace.
- Select the Event hub name (i.e., blumira-log-stream).
- In the Event hub policy name box, select RootManageSharedAccessKey.
- Click Save.