Splunk Search

Splunk Time difference search

Sirius27
New Member

I have two results of servers list as per last 30 days and last 12 hrs. I want to compare and find out which servers are not reporting in 12 hrs list. What can be the query for it.
Little new in Splunk.

Labels (1)
0 Karma

Sirius_27
Explorer

Hi,
That worked wonderfully, but I'm not getting what type of output is coming lastreport as  some 10 numbers of digit is coming in it.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

lastreport will be an epoch time i.e. the number of seconds since the beginning of 1970. Use strftime to format how it is displayed

| fieldformat lastreport=strftime(lastreport,"%Y/%m/%d %H:%M:%S")

 

ITWhisperer
SplunkTrust
SplunkTrust
| stats latest(_time) as lastreport by server
| where now()-lastreport > 12*60*60
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...