<?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 Logs not getting pushed to splunk server by Splunk logging for java using Http Event Collector with log4j configuration in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Logs-not-getting-pushed-to-splunk-server-by-Splunk-logging-for/m-p/683004#M114029</link>
    <description>&lt;P&gt;I am sending logs from application to splunk server by Splunk logging for java using Http Event Collector with log4j2 configurations.&lt;/P&gt;
&lt;P&gt;Actually logs are printed correctly in console but not getting pushed to splunk server.&lt;BR /&gt;&lt;BR /&gt;And I am not evening getting any Error.&lt;/P&gt;
&lt;P&gt;Below is my log4j2.xml configuration file&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;

&amp;lt;Configuration status="info" name="example" packages="org.example"&amp;gt;

&amp;lt;Appenders&amp;gt;

&amp;lt;Console name="console" target="SYSTEM_OUT"&amp;gt;

&amp;lt;PatternLayout

pattern="%style{%d{IS08661}} %highlight{%-5level }[%style{%t}{bright, blue}] %style{%C{10}}{bright,yellow): %msg%n%throwable" /&amp;gt;

&amp;lt;/Console&amp;gt;

&amp;lt;File name="MyFile" fileName="logs/app.log"&amp;gt;

&amp;lt;PatternLayout&amp;gt;

&amp;lt;Pattern&amp;gt;%d %p %c{1.} [%t] %m%n&amp;lt;/Pattern&amp;gt;

&amp;lt;/PatternLayout&amp;gt;

&amp;lt;/File&amp;gt;

&amp;lt;SplunkHttp name="httpconf"

url="http://localhost:8088"

token="b489e167-d96d-46ec-922f-6b25fc83f199"

host="localhost"

index="spring_dev"

source="source name"

sourcetype="log4j"

messageFormat="text"

disableCertificateValidation="true"&amp;gt;

&amp;lt;PatternLayout pattern="%m" /&amp;gt;

&amp;lt;/SplunkHttp&amp;gt;

&amp;lt;/Appenders&amp;gt;

&amp;lt;Loggers&amp;gt;

&amp;lt;Root level="info"&amp;gt;

&amp;lt;AppenderRef ref="console" /&amp;gt;

&amp;lt;AppenderRef ref="MyFile"/&amp;gt;

&amp;lt;AppenderRef ref="httpconf" /&amp;gt;

&amp;lt;/Root&amp;gt;

&amp;lt;/Loggers&amp;gt;

&amp;lt;/Configuration&amp;gt;&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 03 Apr 2024 10:59:49 GMT</pubDate>
    <dc:creator>VinayakJamadar</dc:creator>
    <dc:date>2024-04-03T10:59:49Z</dc:date>
    <item>
      <title>Logs not getting pushed to splunk server by Splunk logging for java using Http Event Collector with log4j configuration</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Logs-not-getting-pushed-to-splunk-server-by-Splunk-logging-for/m-p/683004#M114029</link>
      <description>&lt;P&gt;I am sending logs from application to splunk server by Splunk logging for java using Http Event Collector with log4j2 configurations.&lt;/P&gt;
&lt;P&gt;Actually logs are printed correctly in console but not getting pushed to splunk server.&lt;BR /&gt;&lt;BR /&gt;And I am not evening getting any Error.&lt;/P&gt;
&lt;P&gt;Below is my log4j2.xml configuration file&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;

&amp;lt;Configuration status="info" name="example" packages="org.example"&amp;gt;

&amp;lt;Appenders&amp;gt;

&amp;lt;Console name="console" target="SYSTEM_OUT"&amp;gt;

&amp;lt;PatternLayout

pattern="%style{%d{IS08661}} %highlight{%-5level }[%style{%t}{bright, blue}] %style{%C{10}}{bright,yellow): %msg%n%throwable" /&amp;gt;

&amp;lt;/Console&amp;gt;

&amp;lt;File name="MyFile" fileName="logs/app.log"&amp;gt;

&amp;lt;PatternLayout&amp;gt;

&amp;lt;Pattern&amp;gt;%d %p %c{1.} [%t] %m%n&amp;lt;/Pattern&amp;gt;

&amp;lt;/PatternLayout&amp;gt;

&amp;lt;/File&amp;gt;

&amp;lt;SplunkHttp name="httpconf"

url="http://localhost:8088"

token="b489e167-d96d-46ec-922f-6b25fc83f199"

host="localhost"

index="spring_dev"

source="source name"

sourcetype="log4j"

messageFormat="text"

disableCertificateValidation="true"&amp;gt;

&amp;lt;PatternLayout pattern="%m" /&amp;gt;

&amp;lt;/SplunkHttp&amp;gt;

&amp;lt;/Appenders&amp;gt;

&amp;lt;Loggers&amp;gt;

&amp;lt;Root level="info"&amp;gt;

&amp;lt;AppenderRef ref="console" /&amp;gt;

&amp;lt;AppenderRef ref="MyFile"/&amp;gt;

&amp;lt;AppenderRef ref="httpconf" /&amp;gt;

&amp;lt;/Root&amp;gt;

&amp;lt;/Loggers&amp;gt;

&amp;lt;/Configuration&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 Apr 2024 10:59:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Logs-not-getting-pushed-to-splunk-server-by-Splunk-logging-for/m-p/683004#M114029</guid>
      <dc:creator>VinayakJamadar</dc:creator>
      <dc:date>2024-04-03T10:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Logs not getting pushed to splunk server by Splunk logging for java using Http Event Collector with log4j configurat</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Logs-not-getting-pushed-to-splunk-server-by-Splunk-logging-for/m-p/683099#M114045</link>
      <description>&lt;P&gt;I'm not very strong on log4j but I'd expect the HEC REST endpoint included in the URL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 20:14:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Logs-not-getting-pushed-to-splunk-server-by-Splunk-logging-for/m-p/683099#M114045</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-04-03T20:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Logs not getting pushed to splunk server by Splunk logging for java using Http Event Collector with log4j configurat</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Logs-not-getting-pushed-to-splunk-server-by-Splunk-logging-for/m-p/683126#M114046</link>
      <description>&lt;P&gt;No, because in official docs they mention only url = %scheme%://%host%:%port%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://dev.splunk.com/enterprise/docs/devtools/java/logging-java/howtouseloggingjava/enableloghttpjava" target="_blank"&gt;https://dev.splunk.com/enterprise/docs/devtools/java/logging-java/howtouseloggingjava/enableloghttpjava&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I tried including HEC REST endpoint but not working in my case.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 01:52:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Logs-not-getting-pushed-to-splunk-server-by-Splunk-logging-for/m-p/683126#M114046</guid>
      <dc:creator>VinayakJamadar</dc:creator>
      <dc:date>2024-04-04T01:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Logs not getting pushed to splunk server by Splunk logging for java using Http Event Collector with log4j configurat</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Logs-not-getting-pushed-to-splunk-server-by-Splunk-logging-for/m-p/683139#M114047</link>
      <description>&lt;P&gt;Ahhh... This is a Splunk-specific class. I thought this was supposed to be some generic HTTP POST based mechanism. OK, in this case it might indeed be inserting the proper REST endpoint on its own.&lt;/P&gt;&lt;P&gt;Anyway, I'd try debugging by just launching tcpdump/wireshark and verifying if there is any connectivity between your app and your HEC input (and if there is - what is going on there). You use unencrypted HTTP so you should see the traffic&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 06:22:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Logs-not-getting-pushed-to-splunk-server-by-Splunk-logging-for/m-p/683139#M114047</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-04-04T06:22:58Z</dc:date>
    </item>
  </channel>
</rss>

