1

I have an azure Linux VM where I want to run custom application which have simple stdout logs. For assumption, assume a python application with logs in print("This is a log") as logs. I want all the stdout logs to be streamed and queried in azure log analytics.

  1. Created the log analytics resource
  2. Connected my azure linux VM

Now what else should i do to see all the stdout logs there in the log analytics?

Bhargavi Annadevara
  • 4,923
  • 2
  • 13
  • 30

1 Answers1

0

You have the option to collect custom logs with Log Analytics agent in Azure Monitor.

The Custom Logs data source for the Log Analytics agent in Azure Monitor allows you to collect events from text files on both Windows and Linux computers. Once collected, you can either parse the data into individual fields in your queries or extract the data during collection to individual fields.

Note that the log files to be collected must match a certain criteria and format. More about it can be found here.

If custom logs do not fit your use-case, you can use other strategies like using custom scripts to write to sources supported by Azure Monitor, or pumping data directly to Azure Monitor using HTTP Data Collector API.

Bhargavi Annadevara
  • 4,923
  • 2
  • 13
  • 30