Splunk Search

Populate predefined field for found strings

subtrakt
Contributor

Good Day,

I'm attempting to create a label for different search responses.

Example:
if search 'A' finds error "500", Field B. is populated with "test1"
if search 'A' finds error "400", Field B. is populated with "test2"

and soo on.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You could do something like this:

... | eval B = case(search finds error "500", "test1", search finds error "400", "test2)
0 Karma

subtrakt
Contributor

thanks. any idea how to tell it to only display if 400 are greater than 350 count?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...