Splunk Search

Create multivalued field in the search based on another field

hmahendrakumar
Path Finder

I wantto create a multivalued field bar based on the value of an existing field foo in each event. For example:

if we have these two events:

event1 foo=3
event2 foo=5

then i should create something like this

event1 foo=3 bar=1,2,3
event2 foo=5 bar=1,2,3,4,5
0 Karma

fox
Path Finder

what are potentially the min and max values that foo can be? This could also decide the approach...?

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

it might be helpful if you elaborated on what you intend to do with such a multivalued field. it's possible that whatever your ultimate goal is, it might be possible to achieve more directly without going through this generation of a field?

0 Karma

hmahendrakumar
Path Finder
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...