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!

Splunk Security Content for Threat Detection & Response, Q1 Roundup

Join Principal Threat Researcher, Michael Haag, as he walks through:An introduction to the Splunk Threat ...

Splunk Life | Happy Pride Month!

Happy Pride Month, Splunk Community! 🌈 In the United States, as well as many countries around the ...

SplunkTrust | Where Are They Now - Michael Uschmann

The Background Five years ago, Splunk published several videos showcasing members of the SplunkTrust to share ...