Archive

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

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
SHOULDLINEMERGE = true
BREAK
ONLY_BEFORE = { messages

Thanks,
Raj

Tags (1)
0 Karma

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
SHOULDLINEMERGE = false
LINE
BREAKER = ([\r\n]+){\s
messages

I would recommend using SHOULDLINEMERGE = false & LINEBREAKER instead of BREAKONLYBEFORE.


See if that works for you.

0 Karma

SplunkTrust
SplunkTrust

What have you tried? Where are you getting stuck?

0 Karma