Reporting

How to create a report that show new log sources added in Splunk?

Narcisse
Loves-to-Learn

I am newbie in Splunk. I need help help creating a report to show new log sources that have been added to Splunk.

Labels (1)
0 Karma

Narcisse
Loves-to-Learn

Hello @gcusello 

Just want to know if you have a new suggestion that will fix my error

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Narcisse,

you can run a simple search like the following:

| metadata index=* earliest=-30d@d latest=now
| stats 
   earliest(_time) AS earliest 
   latest(_time) AS latest 
   values(index) AS index 
   values(host) AS host 
   BY sourcetype
| where latest-earliest<86400
| eval 
   earliest=strftime(earliest,"%Y-%m-%d %H:%M:%S"), 
   latest=strftime(latest,"%Y-%m-%d %H:%M:%S")

In this way you can check the Data arrived in the last 24 hours not present in the previous 29 days.

Ciao.

Giuseppe

0 Karma

Narcisse
Loves-to-Learn

Thanks for your response but I am getting these messages

Error in 'metadata': You must specify a 'type' argument to 'metadata', as in 'type=hosts'.

The search job has failed due to an error. You may be able view the job in the Job Inspector.Query1.PNG

Tags (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Narcisse,

please try this:

| tstats earliest(_time) AS earliest latest(_time) AS latest values(host) AS host WHERE earliest=-30d@d latest=now BY sourcetype index
| where latest-earliest<86400
| eval 
   earliest=strftime(earliest,"%Y-%m-%d %H:%M:%S"), 
   latest=strftime(latest,"%Y-%m-%d %H:%M:%S")

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to January Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...