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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...