Splunk Search

How to create a multivalue FieldC with the common values found in multivalue fields FieldA and FieldB?

vbumgarner
Contributor

I have two fields that are multivalue, and I need to know what they have in common.

For instance, given:
a=[1,2,3]
b=[2,3,4]
I want to create:
c=[2,3]

I made it work with some crazy mvexpand, but I'd really rather not do that. I tried to make it work using a combination of mvfilter and mvfind, but couldn't make that work, either.

Any thoughts on how to do this more efficiently?

Cheers.

0 Karma

fdi01
Motivator

you can use also mvindex and mvzip command to do it.

the if() or case() and match( ) functions are used to build your condictions fine on.

0 Karma
Get Updates on the Splunk Community!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...