Where is my custom log data?
The ability of OMS to ingest custom log files enables almost limitless possibilities for you to collect and analyse data from your systems. In fact, a common usage is for customers to use their own PowerShell scripts to collect, collate and create custom logs for uploading and analysis.
If this sounds appealing, you can read more about setting up custom logs at Custom logs in Log Analytics.
I am not writing this to beat the drum for using customer logs but to make you aware of a gotcha that I’ve seen a few of our customers hit when doing this.
We currently only support the ASCII and UTF-8 encodings. This is especially relevant if you are using the PowerShell
out-file cmdlet because it defaults to UTF-16.
So, when writing your custom log file, be sure to include the
-encoding switch and specify either
out-file -Encoding utf8 -FilePath c:\logs\somelog.log
Senior Escalation Engineer