Last updated
Was this helpful?
Last updated
Was this helpful?
Using the csv
log parser, the process of parsing files in CSV format is based on converting each row into a simple JSON object mapping keys to values. To do that, each column must be given a name.
To parse CSV logs without a header row, Panther needs to know which names to assign to each column.
Let's assume our logs are CSV with 7 columns: year, month, day, time, action, ip_address, message. Some example rows of this file could be:
We would use the following LogSchema to define log type:
In the Panther Console, we would follow the , selecting the CSV parser.
In the Fields & Indicators section (below the Parser section shown in the screenshot above), we would define the fields:
Avoid using such schemas in combination with others. Use a separate source or S3 prefix.
To parse CSV logs that starts with a header row, Panther has two options:
Use the names defined in the header as the names for the JSON fields or,
Skip the header and define the names the same way we did for headerless CSV files
To use the names in the header the configuration for the parser should be:
To ignore the header and define your set of names for the columns use: