Splunk Search

How to use comparison operators in a search to match field value condition?

gajananh999
Contributor

Hello Everyone,

i want to check one condition in splunk and if that condition match and then i need to get those events who matches condition else result should be null

LAST < sysdate - (1/(2*24)) 

LAST is one field in splunk and can one help me out here.
for sysdate -(1/(2*24)) i have done eval tnow = now() | eval finalvalue=tnow-0.0208333333333333

so now i have to check the LAST < finalvalue

I have tried this

search string  |eval tnow = now()  | eval finalvalue=tnow-0.0208333333333333| eval Severity=if(LAST < finalvalue,NODE,null()) | table Severity,NODE

when i am doing this if condition doesn't match also it is creating table with first field as null.

Can anyone help me out here

Thanks

 

0 Karma
1 Solution

gajananh999
Contributor

Hello Everyone i have used where condition LAST > finalvalue

View solution in original post

0 Karma

gajananh999
Contributor

Hello Everyone i have used where condition LAST > finalvalue

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...