Log analytics Workspace custom log

sakuraime 2,351 Reputation points
2022-03-10T16:36:14.747+00:00

I see the custom log setting in Log analytics workspace need to use Windows Agent, and set the log path in the windows .

But I would like to create a custom log on log analytics workspace , however I would like to use Log analytics workspace restapi to post data/log to that custom log/table.

how we can do that?

https://learn.microsoft.com/en-us/azure/azure-monitor/logs/data-collector-api

is it still under preview ?

if using custom log by windows agent , still can use RestAPI to send data to that custom log ?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andrew Blumhardt 10,071 Reputation points Microsoft Employee
    2022-03-10T17:00:18.737+00:00

    I think you may be confused here.

    The Custom Logs section in the workspace resource settings lets you identify a text or CSV file that is collected by the monitoring agent. That data gets written to a custom table or _CL.

    When you write to the workspace using the API it also puts its data into a custom table. The API would be used in an application or Logic App to transfer data into the workspace from some other source. For example, copying in data from a 3rd party service. The Microsoft agent would not be involved in this transaction.

    The reason the API is in preview is that it was recently updated to support the new AMA agent.

    0 comments No comments

  2. Vivek Kosare 1 Reputation point
    2022-03-11T16:28:10.67+00:00

    This link will help you to create the custom logs. It tells how to post data OR log the logs using the log analytics rest api

    https://learn.microsoft.com/en-us/azure/azure-monitor/agents/data-sources-custom-logs

    To use the custom log by windows agent, You can configure the Agents Configuration Menu in Log Analytics Workspace


Your answer

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