Getting Data In

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


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

Ultra Champion

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!

Splunk Forwarders and Forced Time Based Load Balancing

Splunk customers use universal forwarders to collect and send data to Splunk. A universal forwarder can send ...

NEW! Log Views in Splunk Observability Dashboards Gives Context From a Single Page

Today, Splunk Observability releases log views, a new feature for users to add their logs data from Splunk Log ...

Last Chance to Submit Your Paper For BSides Splunk - Deadline is August 12th!

Hello everyone! Don't wait to submit - The deadline is August 12th! We have truly missed the community so ...