Splunk Enterprise

Pull out details by Rex

luckyman80
Path Finder

Hi Expert,

                     Quite new to Splunk . From the example log line below

03:23:05.056 [publish-1] INFO LoggingAuditor - [testout] TracingOutgoing: 8=FIX.4.29=90635=8115=ONMI=SOMEVENUE34=37249=BRX60256=testout 52=20210727-07:23:05.05

Is it possible to pull out in columns headers somehow ? 

LogType=LoggingAuditor

Destination=[testout]

Direction=TracingOutgoing

SendingTime=52=20210727-07:23:05.05 (just the time ) ?

Thanks so much ! 

Labels (1)
Tags (3)
0 Karma

luckyman80
Path Finder

worry what i mean is . I can see the words I need to rex out.. but how do i call the table columns something else like the original post 

 

LogType=LoggingAuditor

Destination=[testout]

Direction=TracingOutgoing

SendingTime=52=20210727-07:23:05.05 (just the time )

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Once your fields are extracted you can call them anything you like using the rename command.

... | rename LogType as LoggingAuditor
---
If this reply helps you, Karma would be appreciated.

richgalloway
SplunkTrust
SplunkTrust

Yes, it's possible and very easy.  The rex command can extract text into fields for you.  Here's an example command that works with the sample event.  You'll need to modify it if I've made incorrect assumptions (like if INFO is not the only level).

| rex "INFO (?<LogType>\w+).*?\[(?<Destination>[^\]]+)] (?<Direction>\w+).*?52=(?<SendingTime>.*)"

You can test your changes at regex101.com

---
If this reply helps you, Karma would be appreciated.

luckyman80
Path Finder

Thanks how do I i see it with columns after ? I see the Rex took but this doesn't seem to work after 

rex "INFO (?<LogType>\w+).*?\[(?<Destination>[^\]]+)] (?<Direction>\w+).*?52=(?<SendingTime>.*)"|table LogType, Destination, Direction, SendingTime

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "INFO (?<LogType>\S+)\s-\s(?<Destination>\[[^\]]+\])\s+(?<Direction>[^:]+):.*\-(?<SendingTime>.*)"
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...