To simplify shipping your Azure activity logs, we provide an automated deployment process. At the end of this process, you’ll have configured an event hub namespace, 2 event hubs, and 4 storage blobs.
The resources set up by the automated deployment can collect data for a single Azure region and ship that data to Logz.io.
What am I setting up in my Azure account?
The automated deployment sets up a new Event Hub namespace and all the components you’ll need to collect logs and metrics in one Azure region.
Each automated deployment sets up these resources in your Azure environment:
- 1 namespace
- 2 Azure functions (1 for logs, 1 for metrics)
- 2 event hubs (1 for logs, 1 for metrics)
- 4 blobs (2 to store logs from the Azure functions, 2 for failover storage)
Each deployed resource has a Logz.io-defined name and ends with a string unique to that deployment.
We name the namespace
LogzioNS—so if your namespace is
LogzioNS6nvkqdcci10p, the rest of the deployed resources will end with
How many automated deployments should I... deploy?
Azure requires an event hub in the same region as your services. Also worth noting is that you can stream data from multiple services to one event hub (as long as it’s in the same region).
So what does this mean for you? It means that you’ll need to do at least one automated deployment for each region where you want to collect logs or metrics.
If needed, configure an automated deployment
If you already set up an automated deployment in this region, you can skip to step 2.
👇 Otherwise, click this button to start the automated deployment.
You’ll be taken to Azure, where you’ll configure the resources to be deployed. Make sure to use the settings shown below.
In the BASICS section
- Resource group
- Click Create new. Give a meaningful Name, such as “logzioEventHubIntegration”, and then click OK.
- Choose the same region as the Azure services that will stream data to this Event Hub.
In the SETTINGS section
- Logs listener host
- Use the listener URL for your logs account region. For more information on finding your account’s region, see Account region.
- Metrics listener host
- Use the listener URL for your metrics account region. For more information on finding your account’s region, see Account region.
- Logs account token
- Use the token of the logs account you want to ship to.
- Metrics account token
- Use the token of the metrics account you want to ship to.
At the bottom of the page, select I agree to the terms and conditions stated above, and then click Purchase to deploy.
Deployment can take a few minutes.
(Optional) Add failsafes for shipping timeouts
You can configure Azure to back up your logs and metrics to Azure Blob Storage. So if the connection to Logz.io times out or an error occurs, you’ll still have a backup of any dropped data.
To do this, expand your function app’s left menu, and then click Integrate.
In the top of the triggers panel, click Azure Blob Storage (outputBlob). The Azure Blob Storage output settings are displayed.
Leave Blob parameter name blank. Enter the Path for the Azure blob you’re sending dropped logs to, and then click Save.
For more information on Azure Blob output binding, see Azure Blob storage bindings for Azure Functions > Output from Microsoft.
Stream data to the new event hubs
So far in this process, you’ve deployed 2 event hubs and 2 function apps (one each for logs and metrics).
Now you’ll need to configure Azure to stream diagnostic logs and metrics to the event hubs you just deployed. When data comes into the event hubs, the function apps will forward that data to Logz.io.
In the search bar, type “Diagnostics”, and then click Diagnostics settings. This brings you to the Diagnostics settings page.
Choose a resource from the list of resources, and click Turn on diagnostics settings to open the Diagnostics settings panel for that resource.
Give your diangostic settings a Name.
Select Stream to an event hub, and then click Configure to open the Select event hub panel.
Choose your event hub:
- Event hub namespace: Choose the namespace that starts with LogzioNS (LogzioNS6nvkqdcci10p, for example)
- Event hub name: Choose insights-operational-logs
- Event hub policy name: Choose LogzioSharedAccessKey
- Click OK to return to Diagnostics settings.
Click OK to return to the Diagnostics settings panel.
In the Log and Metrics sections, select the data you want to stream, and then click Save. The selected data will now stream to the event hub.
Check Logz.io for your data
Give your data some time to get from your system to ours, and then open Kibana. If everything went according to plan, you should see logs (with the type
eventhub) and metrics in Kibana.
If you still don’t see your logs, see log shipping troubleshooting.