Splunk Search

Custom Condition

TiagoMatos
Path Finder

Hello, I have a table that returns with these fields: AvgLow and AvgLowNOW, but they appear many times, like this

AvgLow AvgLowNOW
a b
a b
a b
a b
a b

I need to create an alert for when AvgLowNOW is greater then AvgLow. But in custome search condition with "search AvgLowNOW>AvgLow", I catch no events. What can I do to solve this?

Thank you

Tags (2)
0 Karma
1 Solution

wagnerbianchi
Splunk Employee
Splunk Employee

Try if() or case() eval functions
http://docs.splunk.com/Documentation/Splunk/5.0.4/SearchReference/Eval

  • hypothetical example:
  • index=appmgmt | eval x=if(status>=status_description,1,0) | table x

View solution in original post

0 Karma

rturk
Builder

Hi Tiago,

From your comments in the other answer, it looks as though you're nearly there. The where function is definitely your friend.

<base search> | where AvgLow < AvgLowNOW

This will return all results where AvgLowNOW is greater than AvgLow (no need to dedup)

Reference:

wagnerbianchi
Splunk Employee
Splunk Employee

Try if() or case() eval functions
http://docs.splunk.com/Documentation/Splunk/5.0.4/SearchReference/Eval

  • hypothetical example:
  • index=appmgmt | eval x=if(status>=status_description,1,0) | table x
0 Karma

TiagoMatos
Path Finder

Ok thank you!

0 Karma

wagnerbianchi
Splunk Employee
Splunk Employee

Is that work? look the example I've just sent...

0 Karma

TiagoMatos
Path Finder

I tried this

search dedup AvgOut,AvgOutQNOW | where AvgOutQNOW>AvgOut

0 Karma

TiagoMatos
Path Finder

I'm Portuguese, but on my work place I don't have access to skype.

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...