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 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, ...