Splunk Search

How to check which all logs are getting ingested and if there are any gaps in it?

SonakshiRaiTH
New Member

Hi,

 

I have to do gap analysis on splunk 

in order to check which all logs are getting ingested and if there are any gaps in it

Please help

 

Thanks,

SR

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @SonakshiRaiTH,

you have to list all the sourcetypes you're waiting for, puth them in a lookup (called e.g. sourcetypes.csv, containing at least one column called sourcetype) and run a simple search like this:

| metasearch index=*
| eval sourcetype=lower(sourcetype), type="index"
| stats count BY sourcetype
| append [ | inputlookup sourcetypes.csv | eval sourcetype=lower(sourcetype), count=0, type="loookup" | fields sourcetype count type ]
| stats sum(count) AS total dc(type) AS dc_type values(index) AS index values(type) AS type BY sourcetype
| eval status=if(dc_type=2,"Both Indexes and lookup",if(total=0,"Only lookup","Only Indexes: ".index))
| table sourcetype status

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...