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!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...