Splunk Search

What is the easiest way to format column headers for raw data that is in a list format?

helenwall
New Member

What is the easiest way to get headers on columns for raw data that is in list format? Here is what the raw data looks like. I am bit confused as to how this process works?

Wed Jun 29 2016 21:39:05 www1 sshd[3861]: Failed password for invalid user admin from 211.166.11.101 port 1256 ssh2

Thank you.

0 Karma

woodcock
Esteemed Legend

You have to extract fields from the events and then use table to present them in a table. Something like this:

... | (?<timestamp>\w+\s+\w+\s+\d+\s+\d+\s+\d+:\d+:\d+)\s+(?<hostname>\w+)\s+\w+\[(?<pid>\d+)\]:\s+(?<message>.*?)\sfrom\s(?<src_ip>\d+\.\d+\.\d+\.\d+)\s+port\s+(?<port>\d+)\s+(?<process_name>.*)$"
| table hostname PID message src_ip port process_name
0 Karma
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...