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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...