<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic log4j socket appender and Splunk? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22464#M3465</link>
    <description>&lt;P&gt;Does Splunk work with a log4j socket appender? ( not the rolling file one). How?&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jul 2010 10:22:16 GMT</pubDate>
    <dc:creator>ljoshi</dc:creator>
    <dc:date>2010-07-29T10:22:16Z</dc:date>
    <item>
      <title>log4j socket appender and Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22464#M3465</link>
      <description>&lt;P&gt;Does Splunk work with a log4j socket appender? ( not the rolling file one). How?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2010 10:22:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22464#M3465</guid>
      <dc:creator>ljoshi</dc:creator>
      <dc:date>2010-07-29T10:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: log4j socket appender and Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22465#M3466</link>
      <description>&lt;P&gt;Splunk can listen on a TCP socket for an arbitrary stream of bytes.  This should include the output of log4j's socket appender.  The inputs.conf stanza for this is similar to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcp://7070]
connection_host=dns
sourcetype=log4j
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There's at least one caveat with this approach - your log4j data is not persisted anywhere until it is indexed.  If the connectivity between your log4j app and splunk is disrupted, or if the Splunk indexer is down for some reason -- you could lose event data.  A forwarder on the log4j host, reading a file produced by the log4j app is more robust in this example.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2010 08:23:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22465#M3466</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2010-07-30T08:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: log4j socket appender and Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22466#M3467</link>
      <description>&lt;P&gt;It's unlikely you want to use SocketAppender with Splunk, since it sends a serialized Java object, LoggingEvent, which is meant for something like SocketNode to receive and deserialize. &lt;/P&gt;

&lt;P&gt;Something that may have more sensible data is to use SyslogAppender. (though I haven't tried it personally)&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2010 06:51:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22466#M3467</guid>
      <dc:creator>bchen</dc:creator>
      <dc:date>2010-09-03T06:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: log4j socket appender and Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22467#M3468</link>
      <description>&lt;P&gt;Fully agree with bchen, you will get serialized garble in your messages on the splunk index using SocketAppender. Log4j properties example below just alter SyslogHost values. Port is optional, but useful to create various index sources.&lt;/P&gt;

&lt;P&gt;We use another appender to created log files of same data, used to fill long term analysis, feed those to splunk in different index.&lt;/P&gt;

&lt;P&gt;example for syslog appender log4j
log4j.appender.SPLUNKiT=org.apache.log4j.net.SyslogAppender
log4j.appender.SPLUNKiT.SyslogHost=[:CustomPort]
log4j.appender.SPLUNKiT.layout=org.apache.log4j.PatternLayout
log4j.appender.SPLUNKiT.layout.ConversionPattern=sv-cdr-posted - %m
log4j.appender.SPLUNKiT.Facility=USER&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2010 00:36:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22467#M3468</guid>
      <dc:creator>mawalters1</dc:creator>
      <dc:date>2010-12-15T00:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: log4j socket appender and Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22468#M3469</link>
      <description>&lt;P&gt;I read your subject and I hava a question because I hava a similar problem. When I read my events in Splunk the data format is different. There are a lot of characters which haven't be it. Can you show me how you are logging your events. Me, I do it but I think it is bad:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LOGGER_SPLUNK.info("Requested serv. : D2T, Nb PAN : " + nbPan +", Requester : " + body.get(NlvValue.REQUESTER_ID) +", User : " + body.get(NlvValue.REQUESTER_ID)+"_ow, Host : "+host+" ServiceName : ");//+ exchange.getProperty(ConstantUtil.SERVICE_NAME));
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this is my log4j.properties:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;log4j.logger.net.awl.bfi.TokenizerWatchdogSplunk=info,watchdogSplunkSocket
log4j.appender.watchdogSplunkSocket=org.apache.log4j.net.SocketAppender
log4j.appender.watchdogSplunkSocket.remoteHost=odpcil01b
log4j.appender.watchdogSplunkSocket.port=5541
log4j.appender.watchdogSplunkSocket.locationInfo=false
log4j.appender.watchdogSplunkSocket.layout=org.apache.log4j.PatternLayout 
log4j.appender.watchdogSplunkSocket.layout.ConversionPattern = [%-5p][%d{dd/MM/yyyy HH:mm:ss}][%c][%F]%m%n
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks by advance,&lt;/P&gt;

&lt;P&gt;Laura                   &lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2012 13:21:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22468#M3469</guid>
      <dc:creator>LauraBre</dc:creator>
      <dc:date>2012-05-18T13:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: log4j socket appender and Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22469#M3470</link>
      <description>&lt;P&gt;Check out &lt;A href="https://github.com/damiendallimore/SplunkJavaLogging"&gt;SplunkJavaLogging&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Log4j and Logback appenders to send events to Splunk via HTTP REST or Raw TCP&lt;BR /&gt;
Helper classes for formatting log events in a best practice semantic format for Splunk&lt;/P&gt;</description>
      <pubDate>Sat, 19 May 2012 04:11:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22469#M3470</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2012-05-19T04:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: log4j socket appender and Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22470#M3471</link>
      <description>&lt;P&gt;i have .log file generate by using log4j. now my task is to pass this .log file into splunk dashboard. can anyone explain me step by step how to pass .log file into splunk dashboard.&lt;/P&gt;

&lt;P&gt;,&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 22:21:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22470#M3471</guid>
      <dc:creator>nappana</dc:creator>
      <dc:date>2019-03-12T22:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: log4j socket appender and Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22471#M3472</link>
      <description>&lt;P&gt;Unfortunately, that library only works with log4j-2.x. Some of us are -- for the sins we've committed in prior lives -- still stuck with log4j-1.x&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2019 15:26:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/log4j-socket-appender-and-Splunk/m-p/22471#M3472</guid>
      <dc:creator>unitedmarsupial</dc:creator>
      <dc:date>2019-12-24T15:26:53Z</dc:date>
    </item>
  </channel>
</rss>

