This repo contains the code and instructions you'll need to ship logs and metrics from your Azure services to Logz.io. At the end of this process, your Azure function will forward logs or metrics from an Azure Event Hub to your Logz.io account.
Note: The metrics solution is deprecated and only works with the elastic-based Logz.io metrics product.
This deployment will create the following services:
Make sure to use these settings:
Parameter | Description |
---|---|
Resource group* | Create a new resource group or select your existing one, and then click OK. |
Region* | Select the same region as the Azure services that will stream data to this event hub. |
Debug* | Add debug logs to your function app. |
Shipping token* | Add the logs shipping token or metrics shipping token for the relevant Logz.io account. This is the account you want to ship to. |
Logs listener host* (Default: listener.logz.io ) |
Use the listener URL specific to the region of your Logz.io account. You can look it up here. |
buffersize (Default: 100) | The maximum number of messages the logger will accumulate before sending them all as a bulk |
For all other parameters; to use your existing services, change the parameter to the relevant service's name. Otherwise, the template will build the necessary services automatically.
*Required fields.
At the bottom of the page, select Review + Create, and then click Create to deploy.
Deployment can take a few minutes.
Now that you've set it up, configure Azure to stream service logs/metrics to your new event hubs so that your new function apps can forward that data to Logz.io.
To send your data to this event hub choose your service type and create diagnostic settings for it.
Under 'Event hub policy name' choose 'LogzioLSharedAccessKey' for logs and 'LogzioMSharedAccessKey' for metrics.
This settings may take time to be applied and some of the services may need to be restarted.
For more information see Stream Azure monitoring data to an event hub for consumption by an external tool from Microsoft.
Give your data some time to get from your system to ours, and then open Logz.io.
If everything went according to plan, you should see logs with the type eventHub
in Kibana, or metrics with the type eventHub
in Grafana.
This deployment will also back up your data in case of connection or shipping errors. In that case the logs that weren't shipped to Logz.io will be uploaded to the blob storage 'logziologsbackupstorage' under the container 'logziologsbackupcontainer'.
If you wish to change parameters values after the deployment, go to your function app page, then on the left menu press the 'Configuration' tab. You'll have the option to edit the following values:
For users currently on the Classic Application Insights, it's essential to migrate to the Log Analytics workspace-based model. To do this:
Important: Be aware that once you migrate to a workspace-based model, the process cannot be reversed.
FUNCTIONS_WORKER_PROCESS_COUNT
default value -> 1@azure/storage-blob
-> 12.12.0 extensionBundle
version [3.3.0, 4.0.0)
-> [4.0.0, 5.0.0)
FUNCTIONS_EXTENSION_VERSION
: ~3
-> ~4
12
-> 16
functionsWorkerProcessCount
Parameter