All Apps and Add-ons

Am i missing something or Splunk fails to extracting fields from _raw randomly?

durandfr
New Member

Hello Splunk Ninjas...

I came across some peculiar behaviors recently and cannot get my head around it...My best guess is to fully leverage the power of all your combined brains into shedding some light...eventually?

Here's the deal:

I get an incremental feed from an Oracle db via dbx2 and it seems to be working flawlessly. _raw is subsequently made of all combined db rows and column which displays onscreen as comma separated value events. For each event, there is an AUTHOR which I've validated from the db.

[base search] | table _raw, AUTHOR

But, somewhat, the AUTHOR field failed to be extracted, even though is belongs to _raw as illustrated below:
alt text

Any clues ladies and gents?

Many thanks for your help.

0 Karma

durandfr
New Member

Resolved with [base search] | eval AUTHOR=tostring(AUTHOR) | rex field=_raw "AUTHOR=\"(?<AUTHOR>\w+)\"" - Splunk devs - is this expected behaviour?

0 Karma

durandfr
New Member

Actually scratch that out - this extract AUTHOR=Null...

0 Karma

ddrillic
Ultra Champion

You can try extracting field by field, something like -

| eval _raw="AUTHOR='name1'"
| rex field=_raw AUTHOR='(?<author_name>\w*)'
0 Karma

bcatwork
Path Finder

I am unsure of why the extraction for this field failed automatically, but you can certainly add a regular expression before your table expression to force splunk to do some additional field extraction.

something like

 rex field=_raw "AUTHOR=\"(?<AUTHOR>\w+)"

So you would have

[base search] | [regex] | [stats or table..etc]
0 Karma

durandfr
New Member

thank you bcatwork - this is what I've also try to apply as workaround but it doesn't force the extraction.Question remains though as why it ain't extracted automatically from some event, while it is from the others (99.8% of all events).

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...