- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to keep original sourcetype in summary index?
I have multiple scheduled searches that run on large indexes and save the results to a summary index. There is no aggregation in the searches, only filtering. An example search would be something like "index=http google.com".
My problem is that when I save the search to the summary index the sourcetype is changed to "stash". I would like to keep the old sourcetype. Is there a way to tell Splunk to keep the original sourcetype?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
| collect index='indexname' sourcetype='sourcetypename'
works fine..i just tried it
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Any particular reason for doing the filtering into it's own index/sourcetype combination?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Summary Indexing by default change the sourcetype to stash. This is how splunk knows that data is already in splunk and your summary data will not be account for your additional license.
You can change the sourcetype, but remember the data will go against your license.
I guess one of the practices is to re-use the source field and set it to sourcetype for summary indexes.
For example :
index=xyz result=success | stats count .... | collect index=summary source=sourcetype
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A workaround for this could be simply doing something like this
index=http google.com | eval orig_sourcetype=sourcetype
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This does not work for me either. I posted a question about it yesterday. any use of the collect command throws your stuff into "stash". How convenient.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This does not seem to work for me. No matter what I do I can't get the Splunk to use the orgin sourcetype when reading from the summary index.
This is the command that is stored in Manager » Searches and reports » View Recent » "latest" :
index="pdns" | search "google" | eval orig_sourcetype=sourcetype | summaryindex spool=t uselb=t addtime=t index="testalarms" file="google_645699260.stash_new" name="google" marker=""
I have also tried updating props.conf:
[source::/opt/splunk/var/spool/splunk/*]
sourcetype = pdns2
or
[stash]
sourcetype = pdns2
priority = 101
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Add following lines in savedsearches.conf under the stanza for saved search you create
action.summary_index.sourcetype = cerner:millennium:audit
or add new filed under summary index
