Getting Data In

How to sync log files with AWS S3 AND send to Splunk Indexer using Splunk forwarder?

koppolu17
Explorer

Hi,
Logs Location :Windows machines. C:\Logs
I'm syncing our application Logs folder (containing text data, extension .log, error.log files) to S3 bucket via AWS CLI
and
Indexing Logs files via splunk forwarder. I wrote inputs.conf and files indexed.
Can we use same splunk forwarder to sync files to S3 bucket( just to maintain a backup, near realtime) ???

I am using AWS CLI utility, a script with command as below
aws s3 sync . s3://MyS3BUCKET --exclude "*.gz" . ,

I strongly believe Splunk forwarder works better than any other tools available in market.
How do I sync log files with AWS S3 AND send to Splunk Indexer using Splunk forwarder?
Thank you and I wish you a happy new year 2019

0 Karma
1 Solution

amiracle
Splunk Employee
Splunk Employee

Are you asking if the UF can run the AWS command? If it's a Windows server, you can probably create a powershell script that will run on an interval and copy the files over to S3 using your command. Here's how you can set that up with the UF and the inputs.conf: https://docs.splunk.com/Documentation/Splunk/6.1.3/AdvancedDev/ScriptSetup .

Just make sure that you properly setup the AWS S3 permissions so that it's not wide open to the world.

View solution in original post

0 Karma

amiracle
Splunk Employee
Splunk Employee

Are you asking if the UF can run the AWS command? If it's a Windows server, you can probably create a powershell script that will run on an interval and copy the files over to S3 using your command. Here's how you can set that up with the UF and the inputs.conf: https://docs.splunk.com/Documentation/Splunk/6.1.3/AdvancedDev/ScriptSetup .

Just make sure that you properly setup the AWS S3 permissions so that it's not wide open to the world.

0 Karma
Get Updates on the Splunk Community!

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

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...