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!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...