Getting Data In

line breaking - regex and capturing group

pmr
Explorer

Hello, Need some help on regex here, am sure i maybe making mistake here but..

trying to break these into seperate events by using LINE_BREAKER under props.conf

sample output of my event :

"datetime=26Aug2001","20:26:02","action=drop","fw_name=NFLcp.NFL.gov","dir=inbound","src=139.67.8.235","dst=139.203.160.214","bytes=48","rule=29","proto=tcp/http"
"datetime=26Aug2001","20:26:03","action=drop","fw_name=NFLcp.NFL.gov","dir=inbound","src=61.138.33.102","dst=139.203.13.45","bytes=48","rule=29","proto=tcp/http"

my props.conf LINE_BREAKER looks like this :

LINE_BREAKER = (tcp/http")

what's happening here is since this is capturing group, it doesnt get displayed in the actual event, looks like this : (without the tcp/http)

"datetime=26Aug2001","20:26:03","action=drop","fw_name=NFLcp.NFL.gov","dir=inbound","src=61.138.33.102","dst=139.203.13.45","bytes=48","rule=29","proto=

i tried using look-ahead like these but its still not working :

LINE_BREAKER = =(?=(tcp/http"))

LINE_BREAKER = =((?=tcp/http"))

any help on this ?

thanks pmr

Tags (1)
0 Karma

gkanapathy
Splunk Employee
Splunk Employee

You probably want something more like:

LINE_BREAKER = ([\r\n]+)(?=\"datetime\=)
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...