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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...