Splunk Search

issues with Field Extraction-Showing Error Messages

SplunkDash
Motivator

Hello,

I have some issues with field extractions and getting error messages. Sample data, extraction codes (REGEX), and error messages provided below. Any recommendation would be highly appreciated. Thank you so much, appreciate your support in these efforts.

 Sample Data:

TESTUser|TESTSYSTEM|DNSTEST|USERTEST|CREATE_SUPER_USER_GROUP|TEST_ELEMENT<GROUP_NAME_group3>|19e4e88e-7fb1-4309-b8a3-93180e41ef86|76.253.69.172|00||2022-04-14T23:59:33.059-0400|{dsUrn: testgroup:'da04c367-b41c-421a-85e1-d5ab759c0c82'}|NA|||||10.207.92.23|23|

TESTUser|TESTSYSTEM|DNSTEST|USER|VIS_EXPORT_EXCEL|TEST_ELEMENT<DNSTES_801482320>|ce01fdc2-2bbe-45ef-845b-f79576e215bf|65.144.148.136|00||2022-05-09T10:21:44.021-0400|{dsUrn: testgroup:'6f10e8f8-100b-4482-9b09-10e18504924c'}|NA|||||10.207.92.23|23|23as

TESTUser|TESTSYSTEM|DNSTEST|USERTEST|IMPERSONATE_USER|TEST_ELEMENT<USERNAME_TESTUser4>|c594626f-e6e9-4abd-9e0b-fa9861c47285|236.214.26.15|00||2022-05-10T07:52:48.052-0400|{dsUrn: testgroup:'DNS -3ac6-4e92-b50b-e903961f5894'}|NA|||||10.207.92.23|23|

TESTUser1TESTUser|TESTSYSTEM|DNSTEST|USER|VIS_SAVE|TEST_ELEMENT<UNVERIFIED_648656466>|5143518f-dc60-433b-a0cc-2fa024b25360|241.254.244.33|00||2022-05-02T05:01:58.001-0400|{dsUrn: testgroup:'157c4534-d970-4b7b-9181-1bddb8f7a670'}|NA|||||10.207.92.23|23|

|TESTSYSTEM|DNSTEST|USERTEST|ENABLE_USER|TEST_ELEMENT<USERNAME_TESTUser1>|2923b00c-0a95-465d-85aa-3af5387e992c|19.173.21.53|00||2022-05-29T12:13:26.013-0400|{dsUrn: 'DNS', groupId:'49de37d5-ea28-45ba-be52-84d933425636'}|NA|||||10.207.92.23|23|

TESTUser6|TESTSYSTEM|DNSTEST|USERTEST|ENABLE_USER|TEST_ELEMENT<USERNAME_TESTUser5>|0f1ba654-03bf-DNS-ac8f-8f5185232d42|245.236.181.176|00||2022-04-09T02:14:23.014-0400|{dsUrn: testgroup:'b6a89e91-ac03-4641-a3bc-166d013df252'}|NA|||||10.207.92.23|23|

TESTUser2|TESTSYSTEM|DNSTEST|USERTEST|UPDATE_TESTDATA|TEST_ELEMENT<USERNAME_TESTUser>|0acf2593-d7ee-4ba8-bf4e-29a4d4adcdaf|213.184.95.84|01|Failed to update TESTDATA. TESTDATA.|2022-03-12T08:03:19.003-0500|{dsUrn: 'gp', groupId:'9850940e-ff7b-4b77-820b-8d0472933c4a'}|NA|||||10.207.92.23|500|2w1

TESTUser|TESTSYSTEM|DNSTEST|USERTEST|CREATE_SUPER_USER_GROUP|TEST_ELEMENT<GROUP_NAME_group3>|9717a152-3809-416a-87a3-e9a4bc9b01a9|14.22.163.187|00||2022-03-19T10:34:35.034-0400|{dsUrn: 'DNSTEST', groupId:'cf9263ba-aff7-4e34-98c1-a09d17aaf8d6'}|NA|||||10.207.92.23|23|header12

REGEX

(?P<UserID>.*?)\|(?P<UserType>.*?)\|(?P<System>.*?)\|(?P<EventType>.*?)\|(?P<EventId>.*?)\|(?P<Subject>.*?)\|(?P<SID>.*?)\|(?P<IPAddr>.*?)\|(?P<EventStatus>.*?)\|(?P<Msg>\w*?)\|(?P<TimeStamp>.*?)\|(?P<DATA>.*?)\|(?P<Period>.*?)\|(?P<MCode>.*?)\|(?P<Type>.*?)\|(?P<Type>.*?)\|(?P<DeviceId>.*?)\|(?P<DesIP>.*?)\|(?P<Code>.*?)\|(?P<Headers>.*?)

Error Messages:

SplunkDash_0-1656166274261.png

SplunkDash_2-1656167461279.png

SplunkDash_1-1656166825565.png

 

 

 

Labels (2)
Tags (1)
0 Karma
1 Solution

gcusello
Legend

Hi @SplunkDash,

the problem is surely that you have a duplicated group name (Type), but there's also another problem that you haven't using somethng like this:

^(?P<UserID>\w*)\|(?P<UserType>\w*)\|(?P<System>\w*)\|(?P<EventType>\w*)\|(?P<EventId>[^\|]*)\|(?P<Subject>[^\|]*)\|(?P<SID>[^\|]*)\|(?P<IPAddr>[^\|]*)\|(?P<EventStatus>[^\|]*)\|(?P<Msg>[^\|]*)\|(?P<TimeStamp>[^\|]*)\|(?P<DATA>[^\|]*)\|(?P<Period>[^\|]*)\|(?P<MCode>[^\|]*)\|(?P<Type>[^\|]*)\|(?P<Type2>[^\|]*)\|(?P<DeviceId>[^\|]*)\|(?P<DesIP>[^\|]*)\|(?P<Code>[^\|]*)\|(?P<Headers>.*)

that you can test at https://regex101.com/r/kOm0YZ/1

Ciao.

Giuseppe

View solution in original post

gcusello
Legend

Hi @SplunkDash,

the problem is surely that you have a duplicated group name (Type), but there's also another problem that you haven't using somethng like this:

^(?P<UserID>\w*)\|(?P<UserType>\w*)\|(?P<System>\w*)\|(?P<EventType>\w*)\|(?P<EventId>[^\|]*)\|(?P<Subject>[^\|]*)\|(?P<SID>[^\|]*)\|(?P<IPAddr>[^\|]*)\|(?P<EventStatus>[^\|]*)\|(?P<Msg>[^\|]*)\|(?P<TimeStamp>[^\|]*)\|(?P<DATA>[^\|]*)\|(?P<Period>[^\|]*)\|(?P<MCode>[^\|]*)\|(?P<Type>[^\|]*)\|(?P<Type2>[^\|]*)\|(?P<DeviceId>[^\|]*)\|(?P<DesIP>[^\|]*)\|(?P<Code>[^\|]*)\|(?P<Headers>.*)

that you can test at https://regex101.com/r/kOm0YZ/1

Ciao.

Giuseppe

SplunkDash
Motivator

Hello @gcusello ,

I implemented your updated REGEX/REX through SPLUNK web interface, it's extracted as expected and showing no errors in preview. But no/any extracted fields are not showing up from search head.  Any thoughts? Thank you so much again and any recommendation would be helpful.

 

 Extracted through this SPLUNK Web Interface:

SplunkDash_0-1656265376679.png

 



 

0 Karma

SplunkDash
Motivator

Hello @gcusello 

Thank you so much for your quick response, truly appreciate it. Yes, you are absolutely correct, and your updated REGEX/REX is now working as expected. Fields are extracted the way it should be and getting no error messages. Thank you so much again and appreciate your support as always.

0 Karma
Get Updates on the Splunk Community!

Routing Data to Different Splunk Indexes in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. The OpenTelemetry project is the second largest ...

Getting Started with AIOps: Event Correlation Basics and Alert Storm Detection in ...

Getting Started with AIOps:Event Correlation Basics and Alert Storm Detection in Splunk IT Service ...

Register to Attend BSides SPL 2022 - It's all Happening October 18!

Join like-minded individuals for technical sessions on everything Splunk!  This is a community-led and run ...