I created an index for one log file in Splunk indexer with sourcetype = _json, but I would like to see the sourcetype name as custom name like json_events instead of _json in Splunk Web. I already tried with rename and it's working fine, but the problem is in feature these kind of sourcetypes (new logs files) will come, then rename applies for all the _json sourcetypes. So, how can we fix it?
While you cannot change your indexed data you can Rename source types at search time . However it might be better to fix the source data for future events rather than use renaming...
"sourcetype" is an index time field. You cannot change once the data is indexed.
- Already indexed data the only option is to reindex the data with correct sourcetype
- For new data, you can assign the correct sourcetype in inputs.conf or props.conf/transforms.conf ,so all future events will be correctly sourcetyped
You will find
Sourcetype Renaming option in
Settings --> Fields menu path. Select the
Destination App and provide the name of current sourcetype,
_json in your case, and the new sourcetype as
json and click Save.
Hope this helps.
thanks for your answer,thats ok.but in my case if in feature same log data(sourcetype) will come into that same destination app then splunk will rename it with this custom name right??