user3656498
user3656498

Reputation: 21

How to ingest Azure web app/web job custom logs into a Azure Monitor Log analytics workspace

We have websites and webjobs hosted in Azure app services that log custom application log data to Azure blob storage (using Monitoring > App service Logs > Application Logging (Blob) option in the app service). We would like to send these log files to Azure Monitor Log analytics workspace as and when they are inserted into the blob storage, so we can aggregate the logs, send alerts etc. Looks like it's easy to send custom log data from a Azure VM to a Log analytics workspace by installing a Microsoft Monitoring agent on the VM but looks like there is no direct support to send the log data from a blob storage. Does anybody have a solution for this?

I've explored using Logic apps for sending data from Blob storage to a Log analytics workspace but didn't have much luck.

Upvotes: 2

Views: 1731

Answers (2)

Simon Elms
Simon Elms

Reputation: 19768

One thing to watch for are the data limits for the Azure Log Analytics HTTP Data Collector API, especially if you're logging potentially large blobs from blob storage.

Quoting from the Data limits section of the Send log data to Azure Monitor by using the HTTP Data Collector API (preview) document:

The data posted to the Azure Monitor Data collection API is subject to certain constraints:

  • Maximum of 30 MB per post to Azure Monitor Data Collector API. This is a size limit for a single post. If the data from a single post exceeds 30 MB, you should split the data into smaller sized chunks and send them concurrently.
  • Maximum of 32 KB for field values. If the field value is greater than 32 KB, the data will be truncated.
  • Recommended maximum of 50 fields for a given type. This is a practical limit from a usability and search experience perspective.
  • Tables in Log Analytics workspaces support only up to 500 columns (referred to as fields in this article).
  • Maximum of 45 characters for column names.

Upvotes: 0

KrishnaG
KrishnaG

Reputation: 3484

AFAIK current best approach to accomplish your requirement is to make use of Azure Log Analytics HTTP Data Collector API which helps to send custom log data to Log Analytics workspace repository. For illustration, you can see sample code as well in the article.

Hope this helps!! Cheers!!

Upvotes: 1

Related Questions