Splunk Search

How to trim each event and create a field to extract only particular words?

Allampally
Path Finder

Hi Experts,

I have few logs as below, i want to capture all unregistered uri (from unregistered uri text to end of the each line) and put them all in one new field. I need to exclude some text in each line of the event

12:39:25.749 AM
30-Apr-2019 00:39:25.749 INFO [Thread-532] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
ApplicationRegistry- Unregistered the uri /google/page for "leaked issue"
ApplicationRegistry- Unregistered the uri /facebook/line for "closed connection"
ApplicationRegistry- Unregistered the uri /redmi/router for "open page"

13:39:25.749 AM
30-Apr-2019 00:39:25.749 INFO [Thread-652] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
ApplicationRegistry- Unregistered the uri /twitter/com for "job manager"
ApplicationRegistry- Unregistered the uri /snapchat/in for "kick off"
ApplicationRegistry- Unregistered the uri /cooler/net for "inner string"

0 Karma

Sukisen1981
Champion
<your index/source> | rex field=_raw "ApplicationRegistry-(?<text>.*)" max_match=0|table text
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...