Deployment Architecture

Streaming with Log4J to Multiple Indexers

ezajac
Path Finder

We are looking to use Log4J to stream log files to Splunk Indexers. In my Splunk environment I have three Splunk Indexers. I found configurations that can be used for non clustered Splunk Environment.
I have other servers that use a forwarder with a Splunk Indexing Group configured.

What modifications are needed Log4J Appender to write to multiple indexers the way that the Splunk Forwarders stream log files?

Tags (1)
0 Karma

Damien_Dallimor
Ultra Champion

Log4J doesn't have Load Balancing appenders , so you couldn't achieve this functionality , unless you wrote your own custom load balancing appender.

You could however setup multiple appender definitions in your log4j config file that write to multiple indexers (although this could result in duplicated data if your indexers are in a cluster)

Also , have you seen the Splunk logging appenders for Log4J ? There are Raw TCP and REST Appenders for Splunk. Also , some of the functionality of the Splunk Universal Forwarder is mimicked ie: data queueing and auto reconnect upon connectivity errors to the Splunk Indexer.

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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...