<?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 Re: Can you directly publish data from your Java application to Splunk Web? in Security</title>
    <link>https://community.splunk.com/t5/Security/Can-you-directly-publish-data-from-your-Java-application-to/m-p/290424#M7766</link>
    <description>&lt;P&gt;This is a perfect use case for the &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE6M"&gt;Splunk HTTP Event collector&lt;/A&gt; and/or &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE7N"&gt;Splunk logging for Java&lt;/A&gt;. &lt;/P&gt;</description>
    <pubDate>Mon, 09 Oct 2017 18:00:58 GMT</pubDate>
    <dc:creator>s2_splunk</dc:creator>
    <dc:date>2017-10-09T18:00:58Z</dc:date>
    <item>
      <title>Can you directly publish data from your Java application to Splunk Web?</title>
      <link>https://community.splunk.com/t5/Security/Can-you-directly-publish-data-from-your-Java-application-to/m-p/290421#M7763</link>
      <description>&lt;P&gt;Hello there,&lt;BR /&gt;
I want to try and catch the spl query submitted on the web interface in my java application, process this query and get the data it wants, and them publish this data from my java application to the web interface.&lt;BR /&gt;
All this should happen in the background so the user can't know that my script got his query and that my script will return his search. is it possible?&lt;BR /&gt;
and one more question, I have splunk on docker and I downloaded the java sdk,&lt;BR /&gt;
 if i execute this command :&lt;BR /&gt;
curl -u admin:xxxx -k &lt;A href="https://localhost:8089/services/auth/login"&gt;https://localhost:8089/services/auth/login&lt;/A&gt; -d username=admin -d password=xxxx&lt;BR /&gt;
i get a session token reply.&lt;BR /&gt;
if I try to connect from the java application I get an handshake_failure&lt;BR /&gt;
Thanks in advance,&lt;BR /&gt;
I hope someone can help me.&lt;BR /&gt;
PS:&lt;/P&gt;

&lt;H2&gt;this is the java code&lt;/H2&gt;

&lt;P&gt;package hellosplunk;&lt;/P&gt;

&lt;P&gt;import com.splunk.Service;&lt;BR /&gt;
import com.splunk.ServiceArgs;&lt;/P&gt;

&lt;P&gt;public class helloSplunk {&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;public static void main(String[] args) {
    // TODO Auto-generated method stub
     ServiceArgs loginArgs = new ServiceArgs();
     loginArgs.setUsername("admin");
     loginArgs.setPassword("xxxx");
     loginArgs.setHost("localhost");
     loginArgs.setPort(8089);
     loginArgs.setScheme("https");

     Service splunkService = Service.connect(loginArgs);

     System.out.println(splunkService.getToken());


}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 10:41:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Can-you-directly-publish-data-from-your-Java-application-to/m-p/290421#M7763</guid>
      <dc:creator>MarcHelou</dc:creator>
      <dc:date>2017-10-07T10:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can you directly publish data from your Java application to Splunk Web?</title>
      <link>https://community.splunk.com/t5/Security/Can-you-directly-publish-data-from-your-Java-application-to/m-p/290422#M7764</link>
      <description>&lt;P&gt;You need something asynchronous&lt;/P&gt;

&lt;P&gt;See here:&lt;BR /&gt;
&lt;A href="http://dev.splunk.com/view/python-sdk/SP-CAAAEE5"&gt;http://dev.splunk.com/view/python-sdk/SP-CAAAEE5&lt;/A&gt;&lt;BR /&gt;
And here:&lt;BR /&gt;
&lt;A href="http://dev.splunk.com/view/javascript-sdk/SP-CAAAEFA"&gt;http://dev.splunk.com/view/javascript-sdk/SP-CAAAEFA&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 03:27:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Can-you-directly-publish-data-from-your-Java-application-to/m-p/290422#M7764</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-10-09T03:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can you directly publish data from your Java application to Splunk Web?</title>
      <link>https://community.splunk.com/t5/Security/Can-you-directly-publish-data-from-your-Java-application-to/m-p/290423#M7765</link>
      <description>&lt;P&gt;Thanks for the reply,&lt;BR /&gt;
that is not exactly what i am searching for unless I didnt understand the documentation.&lt;BR /&gt;
in other word what i want is that everytime an spl query is made, it triggers my java application, and sends the query to my java app, this app performs the query and with the returned results, my java app posts them [the results] back to the splunk web interface.&lt;/P&gt;

&lt;P&gt;so let's say:&lt;BR /&gt;
1- you searched : index=_audit&lt;BR /&gt;
2- the query goes to the java app&lt;BR /&gt;
3- the java contact the splunkd&lt;BR /&gt;
4- splunkd returns results to the java&lt;BR /&gt;
5- the java posts the result back to the web interface&lt;/P&gt;

&lt;P&gt;I want to know if that is possible or not&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 07:39:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Can-you-directly-publish-data-from-your-Java-application-to/m-p/290423#M7765</guid>
      <dc:creator>MarcHelou</dc:creator>
      <dc:date>2017-10-09T07:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can you directly publish data from your Java application to Splunk Web?</title>
      <link>https://community.splunk.com/t5/Security/Can-you-directly-publish-data-from-your-Java-application-to/m-p/290424#M7766</link>
      <description>&lt;P&gt;This is a perfect use case for the &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE6M"&gt;Splunk HTTP Event collector&lt;/A&gt; and/or &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE7N"&gt;Splunk logging for Java&lt;/A&gt;. &lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 18:00:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Can-you-directly-publish-data-from-your-Java-application-to/m-p/290424#M7766</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2017-10-09T18:00:58Z</dc:date>
    </item>
  </channel>
</rss>

