Splunk Dev

How can I extract information from the following source field?

medvelsplunk
Engager

I have the following source field C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ekPRANBAI\WEB-INF\executables\bin\ekPRUEBA\WEB-INF\cache\scripts\iperf-8998.txt . I want to extract 8998 into a suc_id field

0 Karma
1 Solution

woodcock
Esteemed Legend

Like this:

| rex field=source "(?<suc_id>\d+)\.txt$"

View solution in original post

woodcock
Esteemed Legend

Like this:

| rex field=source "(?<suc_id>\d+)\.txt$"

medvelsplunk
Engager

Tanks Woodcock

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Depending on how varied the source field can be this could work.

... | rex field=source "-(?<suc_id>[\d]+)\.txt" | ...
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...