OMC HOW-TO: Easily Create a CSV Log Parser
Summary
A simple way to create a log analytics log parser for CSV or other delimited filesContent
When creating a regex parse expression for a CSV delineated file, one approach that works fairly well is to use a series of regex captures like this:
([^,]*),
What this means is capture anything that is not a comma up until there is a comma following. You can then chain as many of these together as you need to capture the given log. In the example above, it shows 5 columns, so you would have a regex expression like this:
{TIMEDATE},([^,]*),([^,]*),([^,]*),([^,]*)
Note that you leave the comma off at the end.
Tagged:
0