Splunk Search

Where can we rename the src field?

danielbb
Motivator

We have the following working query -

(index=wineventlog sourcetype=WinEventLog NOT ("xxxx" OR "yyyy") 
src_ip IN (<mulitple IPs>)) OR (index=checkpoint 
dst IN (<mulitple IPs>) action=Accept ) 
| eval destination_ip = coalesce(<one name>,<second name>) 
| transaction destination_ip maxpause=60s

Both index=wineventlog and index=checkpoint have a src field.

Where can we rename it? because we end up after the transaction command with two srcfields.

Tags (1)
1 Solution

richgalloway
SplunkTrust
SplunkTrust

You can rename the field any time after the first pipe. Of course, that will rename the field from both indexes. To rename only one index, you'll need to split the base query, do the rename, then combine them with append.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

You can rename the field any time after the first pipe. Of course, that will rename the field from both indexes. To rename only one index, you'll need to split the base query, do the rename, then combine them with append.

---
If this reply helps you, Karma would be appreciated.

danielbb
Motivator

Thank you @richgalloway.

The developer did | eval src-{index} = src which generated the src-wineventlog and src-checkpoint fields. She is happy ; -)

0 Karma

richgalloway
SplunkTrust
SplunkTrust

If your problem is resolved, please accept the answer to help future readers.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...