sending databricks driver logsc (stderr) to azure monitor

Antony Micheal 0 Reputation points
2024-01-09T11:10:59.4366667+00:00

Hi Everyone, Thanks in advance for helping out..
I want to send driver logs generated (stderr logs) in databricks to azure monitor, how can I achieve this?
the logs are getting saved in a dbfs location. I have been looking for a solution for 2 weeks now. :(

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,663 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,539 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sedat SALMAN 14,180 Reputation points MVP
    2024-01-09T20:58:04.7733333+00:00

    To send driver logs (stderr logs) from Databricks to Azure Monitor, you need to perform several integrated steps across both platforms. Firstly, it's essential to enable diagnostic logging in your Azure Databricks workspace. This involves configuring your workspace settings to ensure that the driver logs are captured and stored in the DBFS location you mentioned.

    Once the logging is configured in Databricks, the next step involves setting up Azure Monitor to collect these logs. You would need to either create a new Log Analytics workspace or use an existing one within Azure Monitor. In this workspace, the configuration focuses on integrating with Databricks. This typically includes installing the Azure Monitor agent on your Databricks clusters, enabling Azure Monitor to fetch logs from Databricks.

    The data sources in Azure Monitor need to be set up to point to the DBFS location where your Databricks logs are being saved. This configuration ensures that Azure Monitor can access and retrieve the logs. Additionally, a custom log collection configuration might be necessary. This configuration defines how logs are collected from Databricks, including specifying the log format and setting up any necessary filters to capture the relevant data.

    0 comments No comments

  2. PRADEEPCHEEKATLA 90,656 Reputation points Moderator
    2024-01-10T04:17:31.48+00:00

    @Antony Micheal - Thanks for the question and using MS Q&A platform.

    To send driver logs generated in Databricks to Azure Monitor, you can use the Azure Monitor Logs integration with Databricks. This integration allows you to stream logs from Databricks to Azure Monitor Logs in near real-time.

    The below articles helps you to configure Azure Databricks with Azure Monitor.

    Send Azure Databricks application logs to Azure Monitor

    Comprehensive look at Azure Databricks Monitoring & Logging

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.