Getting Data In

DB Connect KEY=VALUE Extraction Fail

cdstealer
Contributor

Hi,  I'm struggling to get a complete extraction on any fields that contain double quotes.

The payload:

2021-05-25 07:59:04.000, auditId="17864172953", groups_groupId="4639", groupName="some group name", people_personId="625841", users_userId="152321", userLogin="field-removed", userStaffFlag="false", auditIP="111.222.333.444", auditMod="Module", auditMessage="Module: "mod1" is not present in a check, Module: "mod2" is not present in a check, Module: "mod3" is not present in a check, Module: "mod4" is not present in a check, Module: "mod5" is not present in a check, Module: "mod6" is not present in a check, Module: "mod7" is not present in a check, Module: "mod8" is not present in a check, Module: "mod9" is not present in a check, Module: "mod10" is not present in a check", auditDate="2021-05-25 07:59:04.0", auditType="info", auditRID="88827e1f-d157-46d5-b1b4-20b91d4440a4", auditMicroSeconds="0.0000"

In this example, it's the "auditMessage" key that will not extract completely and stops at the first "Module: "<--

The REGEX (\w+)="(.*?)" Gets me most of the way there (regx101), but doesn't work in splunk.

My Fu has failed me.

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

cdstealer
Contributor

So after a little more reading, this is a known issue with DBConnect.  The official work around is to use KV_MODE and then apply a search time extraction for the problematic fields.

auditMessage="(?P<auditMessage>.+?)",

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Would you believe you're only missing a comma?  This works in regex101.com

(\w+)="(.*?)",
---
If this reply helps you, Karma would be appreciated.
0 Karma

cdstealer
Contributor

HI Rich,  Thanks for the response.  I had already done that, works in reg101 but not in splunk

I've also come up with (?:([\w+]+)=(?:\")(.+?)(?:\",\s|\"$)) which does exactly what I want on reg101 , but again doesn't work the same in Splunk.

0 Karma

cdstealer
Contributor

So after a little more reading, this is a known issue with DBConnect.  The official work around is to use KV_MODE and then apply a search time extraction for the problematic fields.

auditMessage="(?P<auditMessage>.+?)",

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Painting a Clearer Picture: Creating Cross-Domain Visibility with AI Canvas

Watch Now Painting a Clearer Picture: Creating Cross-Domain Visibility with AI Canvas     Do you ever feel ...

Build and Launch AI Agents from Your Splunk Workflows

Replay Tech Talk Build and Launch AI Agents from Your Splunk Workflows     We’ve all been there: juggling ...

index This | What kind of room has no doors?

IndexEducation Cover Art Banner Cisco.png August 2026 Edition  Hayyy Splunk Education Enthusiasts and the ...