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 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...