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.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...