Getting Data In

Sourcetype alias

aknsun
Path Finder

Hi,

We have been using a custom method to get cloudtrail to Splunk by using log files on a server that has the Cloudtrail data. This custom method was setup sometime back and has been using a sourcetype that is different to the one that comes via the AWS Add On ("aws:cloudtrail"). As we are now planning to migrate off this method and move to AWS Add On, is there any way that we can still use the old sourcetype along with "aws:cloudtrail" by sourcetype aliasing, if that is an option?

Thanks.

AKN

Tags (1)
0 Karma
1 Solution

chris_barrett
SplunkTrust
SplunkTrust

It's not clear if they are (and I suspect that that they aren't if they're coming out of log files), but if your old style events are in the same format as the aws:cloudtrail events then you should be able to use a rename=aws:cloudtrail in the props.conf on your Search Head(s).

[old_sourcetype]
rename = aws:cloudtrail

Ref: https://docs.splunk.com/Documentation/Splunk/latest/Data/Renamesourcetypes

View solution in original post

chris_barrett
SplunkTrust
SplunkTrust

It's not clear if they are (and I suspect that that they aren't if they're coming out of log files), but if your old style events are in the same format as the aws:cloudtrail events then you should be able to use a rename=aws:cloudtrail in the props.conf on your Search Head(s).

[old_sourcetype]
rename = aws:cloudtrail

Ref: https://docs.splunk.com/Documentation/Splunk/latest/Data/Renamesourcetypes

aknsun
Path Finder

Hi @chris_barrett. Thanks for the suggestion.

0 Karma

koshyk
Super Champion

There are few options you can consider
1. sourcetype aliasing is NOT a good option. This is because it is an sourcetype is indextime field and fundamental data transforms work off the sourcetype. But you can have two sourcetypes alongside till time runs ahead and the old sourcetype data is deleted in say 1 or 2 years? There is no issue in using old sourcetype and new sourcetype , but users may need to put an OR condition.
2. Create an eventtype something like this in eventtypes.conf

[aws_cloudtrail]
search = (sourcetype=yourOldSourcetype OR sourcetype=aws:cloudtrail)

and in searches , just use eventtype=aws_cloudtrail. This makes it transparent to user

3) this is cumbersome option of reindexing the old sourcetype to new sourcetype. More licensing, more work etc.

aknsun
Path Finder

Thanks @koshyk. Let me try out this option.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...

Edge Processor Scaling, Energy & Manufacturing Use Cases, and More New Articles on ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Get More Out of Your Security Practice With a SIEM

Get More Out of Your Security Practice With a SIEMWednesday, July 31, 2024  |  11AM PT / 2PM ETREGISTER ...