Splunk Search

Error when trying to extract fields

mcg_connor
Path Finder

I currently am trying to extract the externalDropshipId from the following log

 "updatedTimestamp" : "2019-12-23T20:43:04.774Z",
  "fulfillmentOrderId" : "124B27HTRBRZC9L6P9KL7GC968",
  "externalOrderId" : "9163225842155",
  "externalDropshipId" : "6372205554",

I am using the field extractor and selecting externalDropshipID as the required text and 6372205554 as the field.

This is resulting in the following error..
The extraction failed. If you are extracting multiple fields, try removing one or more fields. Start with extractions that are embedded within longer text strings.

How would I go about fixing this?

Thanks

0 Karma
1 Solution

mydog8it
Builder

try replacing the regex in the field extractor with this:

externalDropshipId\W\s:\s"(?<externalDropshipId>\d+)"

View solution in original post

mydog8it
Builder

try replacing the regex in the field extractor with this:

externalDropshipId\W\s:\s"(?<externalDropshipId>\d+)"

mcg_connor
Path Finder

Thanks! Seems I should start learning regex's instead of relying on the Splunk extractor

0 Karma

mydog8it
Builder

regex101.com is a great site to test regex between that and the Splunk Quick Reference available here-->>
Splunk Quick Reference

You can get a start developing more complex field extractions than the field extractor was meant to provide.

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!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...