Getting Data In

how to use source stanza in props.conf with spefic regex?

rajasekhar14
Path Finder

i'm trying yo use below source stanza in props.conf file to break the events.

my source pattern will be ""xxx/messeages or performance/345/345/xxxxx.blob"" can you guys please help with this PCRE?

after the regex i will use below settings
[source::]
sourcetype = Json
SHOULD_LINEMERGE = true
BREAK_ONLY_BEFORE = { messages

Thanks,
Raj

Tags (1)
0 Karma

jnudell_2
Builder

Hi @rajasekhar14 ,

It's not straight PCRE, it includes the path translations as specified in the props.conf documentation.
You could use something like:

[source::.../(messages|performance)/345/345/*.blob]
sourcetype = json
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+){\s*messages

I would recommend using SHOULD_LINEMERGE = false & LINE_BREAKER instead of BREAK_ONLY_BEFORE.


See if that works for you.

0 Karma

nplamondon
SplunkTrust
SplunkTrust

What have you tried? Where are you getting stuck?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

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 ...