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!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...