Jan 15 2021 03:48 AM
I have containers deployed in AKS. Those containers log into custom files. I want to analyse those logs using Azure Monitor (Log Analytics).
Kindly provide the steps to achieve that.
Thank You
Jan 15 2021 09:04 AM
You can write app logs to STDOUT and then oms agent will push these logs to log analytics workspace.
You can refer to logs under container logs ... using Log Query
ContainerLog
| project TimeGenerated ,LogEntry, LogEntrySource
Jan 26 2021 12:04 AM - edited Jan 26 2021 01:32 AM
Hi what is format of your log files ?
If you don't use OMS agent you can use externaldata operator to read files, like csv or tsv, scsv, sohsv, psv, txt, raw.
You can also parse text or use predefined structures like
JSON
XML
IPv4
URL
URL query
File path
User agent
Version string
https://docs.microsoft.com/fr-fr/azure/azure-monitor/log-query/parse-text