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!

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...