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!

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...