Splunk Search

How can I create a third field based on unique combinations of two other fields

cmontonen
Explorer

Hello all,
I am really new to Splunk and cannot for the life of me figure this one out.
Unfortunately, Googling around for answers has not been helpful.

I have records which contain two important fields initiator_country and responder_country.
I am interested in observing records with rare combinations of the two fields.
There are 3 possible values for initiator_country and responder_country, so 9 total combinations.
I would like to create a 3rd field for each record indicating which initiator_country - responder_country
combination the record belongs to, but I am not really sure where I should start.

Thank you very much!

Tags (2)
0 Karma
1 Solution

woodcock
Esteemed Legend

Is this what you mean?

... | eval newField = initiator_country . "-" . responder_country

View solution in original post

woodcock
Esteemed Legend

Is this what you mean?

... | eval newField = initiator_country . "-" . responder_country

cmontonen
Explorer

Wow! Thank you very much!
I just tested it and it worked!

0 Karma
Get Updates on the Splunk Community!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...