Monitoring Splunk

Best way to monitor and index millions of files in Splunk

raja21
Explorer

Hi developers, I am trying to analyse some logs by extracting them in JSON format and feeding to splunk.
I have millions of these logs each resulting in a JSON file of 4-5 kb.
How to monitor these files effectively so that spunk picks up each file.

Thanks.

Tags (1)
0 Karma

ddrillic
Ultra Champion

A major issue can be the ulimits for open files. Read please the great post by @yannk at how to tune ulimit on my server ?

0 Karma

FrankVl
Ultra Champion

I see 2 main options:

  1. Put a Universal Forwarder on the system that is storing these logs and create a monitor input for the respective folder.
  2. If you're using some kind of script to extract those logs, you could modify that script to send the JSON data by HTTP POST request to a Splunk Heavy Forwarder / Indexer set up as a HTTP Event Collector: http://docs.splunk.com/Documentation/Splunk/latest/Data/AboutHEC

I don't have experience myself with such huge amounts of files, but unless you get some specific recommendations here, I'd suggest to just give it a try (in a test setup ideally of course) and see what issues you run into. Then you can always post back here to get help resolving those issues.

0 Karma

raja21
Explorer

hi @FrankVl, I tried HTTP Event Collector method and found it to be useful.

Now the issue is i have to run curl command for each files. On a daily basis i get millions of files to process so would it be an overhead to run curl so many times?

I also have an idea of merging all the JSON records into one file seperated by [EOF] and send that file across to splunk and break events using [EOF].
But its not getting inputted into splunk as [EOF] is not in JSON format.

Any other solutions??

0 Karma

FrankVl
Ultra Champion

Don't think curl should give too much overhead, but you should be able to see that for yourself whether it causes problematic load.

As per your other idea: I don't completely follow what you tried and what is failing.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...