Getting Data In

List of sourcetypes with no data for past 7 days

atreece
Path Finder

I have a bunch of logs from a program that regularly updates local files with changes in network files, and I would like to find out which computers haven't received an update in the past 7 days.
The fields I am using to differentiate the computers is source and sourcetype.

However, the only way to tell if no files have been updated is if there are no events logged in splunk.

Is there an feasible way to denote this? I need a list of all of the sources/sourcetypes which haven't had any events in the past 7 days.

Tags (2)
0 Karma
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

Using metadata is a great tool for this question. This search will return any sourcetype that hasn't reported a "lastTime" before (now - 7 days of seconds ago).

|metadata type=sourcetypes|eval sevenDaysAgo = now() - (7*24*3600)|where lastTime < sevenDaysAgo

Same thing for sources

|metadata type=sources|eval sevenDaysAgo = now() - (7*24*3600)|where lastTime < sevenDaysAgo

View solution in original post

alacercogitatus
SplunkTrust
SplunkTrust

Using metadata is a great tool for this question. This search will return any sourcetype that hasn't reported a "lastTime" before (now - 7 days of seconds ago).

|metadata type=sourcetypes|eval sevenDaysAgo = now() - (7*24*3600)|where lastTime < sevenDaysAgo

Same thing for sources

|metadata type=sources|eval sevenDaysAgo = now() - (7*24*3600)|where lastTime < sevenDaysAgo

atreece
Path Finder

Thanks! That's giving me exactly the data I need.

0 Karma

MHibbin
Influencer

ahh beat me to it! Up-voted

Get Updates on the Splunk Community!

Splunk Search APIを使えば調査過程が残せます

   このゲストブログは、JCOM株式会社の情報セキュリティ本部・専任部長である渡辺慎太郎氏によって執筆されました。 Note: This article is published in both Japanese ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

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