Getting Data In

Eval command with like condition with greater than and less than format?

pavanae
Builder

Hi I have the following command in my query 

 

My splunk search | eval message=IF((like(source,"ABC%") OR like(source,"DEF%")) AND avg_latency>120 ,"Host with more than 2 minutes Latency","")

 

 

where avg_latency is a field with values but for some reason the above condition is not working for me. 

 

Could someone check if there is any format issue on my eval condition and let me know how I can make it correct?

Labels (3)
Tags (4)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

Divide and conquer.

First, test your simple conditions and check whether they match on they own. Then you can build a complex one.

Maybe you're not matching on like() because it's not at the beginning of a string. Maybe the field you're comparing is a string, not a number...

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...