Start your 14-day free trial today

No Credit Card Required

Try Logit.io Free

Already have an account? Sign In

Send data via Azure Activity Logs to your Logstash instance provided by Logit.io

Azure Activity Logs

Pull Activity logs from Azure to Logstash

In Microsoft Azure the Activity Log is a platform that provides insights into subscription level events, including auditable details of when a resource is modified or when a container is started. By configuring the required activity logs to forward to Event Hub we can then pull them into the Logit.io ELK Stack via Logstash.

Step 1 - Ensure Azure Event HubCopy

Before you begin you will need to ensure you have an available Azure Event Hub in the Azure Portal.

You should create a diagnostic setting to send the Activity logs to this Event Hub.

View your Azure event hub

Once you have configured your Event Hub we now need to confirm messages are arriving.

Step 2 - Confirm Messages in Event HubCopy

In your Azure Portal browse to your Event Hub, from the dashboard you should be able to see messages arriving.

Ensure there is recent activity on the graph and the incoming requests isn't zero.

Graphs showing that messages are arriving

Step 3 - Configure permissionsCopy

Once you have data streaming to your Azure event hub, it is recommended to create a Consumer Group specifically for Logstash and not to reuse any default or existing groups.

The Logstash input supports multiple event hubs - the connection string for each hub can be found in the Azure Portal -> Event Hub -> Shared access policies.

example connection string
Endpoint=sb://<youreventhubnamespace>.servicebus.windows.net/;SharedAccessKeyName=<yoursharedaccesspolicyname>;SharedAccessKey=<yoursharedaccesskey>;EntityPath=<youreventhubname>

A blob storage account is used to preserve state across logstash reboots. The Storage account connection string can be found in the Access Keys section under the Storage Account Settings menu in the Azure Portal

example connection string

DefaultEndpointsProtocol=https;AccountName=<storage-account-name>;
AccountKey=<storage-account-key>;
EndpointSuffix=core.windows.net

Step 4 - Configure Logstash for Azure Event HubCopy

To start pulling logs and metrics from the Azure Event Hub to your Stack you need to configure an Azure Logstash Input on your Logit.io Stack.

Go to Dashboard

Logit.io will verify your input before it is applied, we will contact you to confirm when this has been completed.

Step 5 - Check Logit.io for your logsCopy

Now you should view your logs:

Launch Dashboard

If you don't see logs take a look at How to diagnose no data in Stack below for how to diagnose common issues.

Step 6 - How to diagnose no data in StackCopy

If you don't see data appearing in your Stack after following the steps, visit the Help Centre guide for steps to diagnose no data appearing in your Stack or Chat to support now.

Toggle View

Compact View

Return to Search

© 2023 Logit.io Ltd, All rights reserved.