Monitoring Splunk

Can you help me remove some unnecessary values in a field?

leninkp3005
Explorer

Hello Folks,

I'm struck with removing result fields unnecessary values:

ex:  src domain 
      (1)www(2)google(3)com 

So, I want to remove (1),(2),(3) instead of replacing dot. results be like www.google.com

if anyone could help me out...

Cheers,
Lenin K

Tags (1)
0 Karma

shin_matsuzawa
Explorer

Hi,

Like this:

| makeresults | eval raw="(1)www(2)google(3)com"
| mvexpand raw
| rename raw AS "example"
| fields - _time
| eval newDomain=replace(example, "\(\d\)", ".")
| eval newDomain=replace(newDomain, "^.", "")

leninkp3005
Explorer

Hi,
I'm not expecting only for www.google.com, for example I gave this domain but Internally I have many domains as per my results.

This is all about DNS debugging queries results which is coming along with (digits) .

Cheers,
Lenin K

0 Karma
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 ...