Splunk Search

Query to find newly added sourcetypes

kteng2024
Path Finder

Hi,

I am using below query to find the newly added sourcetypes .

| metadata type=sourcetypes | eval time=now()-firstTime | where time

0 Karma
1 Solution

woodcock
Esteemed Legend

This tells you sourcetypes which are new in the last week ( 7 days):

| metadata type=sourcetypes 
| eval firstAgoSeconds=now()-firstTime 
| where firstAgoSeconds < (7 * 24 * 60 * 60)
| convert timeformat="%m-%d-%Y %H:%M:%S" ctime(firstTime) ctime(lastTime) ctime(recentTime)

View solution in original post

woodcock
Esteemed Legend
0 Karma

woodcock
Esteemed Legend

This tells you sourcetypes which are new in the last week ( 7 days):

| metadata type=sourcetypes 
| eval firstAgoSeconds=now()-firstTime 
| where firstAgoSeconds < (7 * 24 * 60 * 60)
| convert timeformat="%m-%d-%Y %H:%M:%S" ctime(firstTime) ctime(lastTime) ctime(recentTime)

vn_g
Path Finder

| metadata type=sourcetypes index="*"
| addinfo
| where (firstTime > info_min_time AND firstTime < info_max_time)

The above helps when you want to filter the value selected from TimeRangepicker.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...