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 Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...