Splunk Search

Merge 'sourcetype-too_small' with 'sourcetype'

zachmaster
Engager

I have the same sourcetype log files separated in different directories by day, and different files for every hour. Some of the log files are only a few lines, while some are thousands of lines. I cannot control how the log files are stored.

The issue is that when I monitor the directories, I get two separate indexes: **sourcetype* and sourcetype-too_small.*

What I want is one index, **sourcetype, which contains every event from all the files.

I do not care if the file is too small, since it should be merged with all the other files anyway.

How do I achieve this?

Thanks.

Tags (1)

renjith_nair
Legend

From your question "The issue is that when I monitor the directories, I get two separate **indexes: sourcetype and sourcetype-too_small." , did you mean two sourcetypes not indexes?

Splunk will automatically assign a source type if you don't provide it explicitly in your inputs.conf.

If you want all log files from the directories under same sourcetype , include the sourcetype parameter also in your inputs.conf

For eg:

[monitor:///apache/.../*.log]
index=<your index name>
sourcetype=<your sourceype>
---
What goes around comes around. If it helps, hit it with Karma 🙂

renjith_nair
Legend

Does it help?

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Wrapping Up Cybersecurity Awareness Month

October might be wrapping up, but for Splunk Education, cybersecurity awareness never goes out of season. ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

&#x1f5e3; You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...

What's New in Splunk Observability - October 2025

What’s New?    We’re excited to announce the latest enhancements to Splunk Observability Cloud and share ...