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!

Index This | What is broken 80% of the time by February?

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

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...