<?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: Splunk socket programming with java SDK in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-socket-programming-with-java-SDK/m-p/59285#M839</link>
    <description>&lt;P&gt;As in 4th step "read in the search result" I need to send result data in csv but with javasdk the search result reader is in XML so how can i get result in csv format?&lt;/P&gt;</description>
    <pubDate>Tue, 11 Dec 2012 20:40:01 GMT</pubDate>
    <dc:creator>disha</dc:creator>
    <dc:date>2012-12-11T20:40:01Z</dc:date>
    <item>
      <title>Splunk socket programming with java SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-socket-programming-with-java-SDK/m-p/59283#M837</link>
      <description>&lt;P&gt;I need to create the socket communication interface between splunk server and non-splunk server.&lt;BR /&gt;
I am using java sdk to interact with splunk and searching the data and exporting it in a file. now I need to send this file thru socket to other server. &lt;BR /&gt;
I know how to use java SDK and I know socket programming in java and how to send file over socket but I am not able to connect socket programming with java SDK.&lt;BR /&gt;
like in java sdk we can connet with Service class but in socket programming we connect to the machine with Socket class. &lt;BR /&gt;
Can anyone help me merging these two things to that I can connect two machines over socket and I can search and extract the data from splunk.&lt;BR /&gt;
Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2012 05:29:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-socket-programming-with-java-SDK/m-p/59283#M837</guid>
      <dc:creator>disha</dc:creator>
      <dc:date>2012-12-11T05:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk socket programming with java SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-socket-programming-with-java-SDK/m-p/59284#M838</link>
      <description>&lt;P&gt;Should be relatively simple :&lt;/P&gt;

&lt;P&gt;1) open your connection to Splunk using Service class&lt;BR /&gt;
2) open your socket connection to destination server using the Socket class&lt;BR /&gt;
3) use the Splunk Service object to execute the search&lt;BR /&gt;
4) read in the search results&lt;BR /&gt;
5) perform any data transformation/filtering&lt;BR /&gt;
6) write results out over the socket connection to the destination server.&lt;/P&gt;

&lt;P&gt;Depending on the volumes of data , you might be able to skip writing to/reading from a file and just work in memory.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2012 09:49:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-socket-programming-with-java-SDK/m-p/59284#M838</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2012-12-11T09:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk socket programming with java SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-socket-programming-with-java-SDK/m-p/59285#M839</link>
      <description>&lt;P&gt;As in 4th step "read in the search result" I need to send result data in csv but with javasdk the search result reader is in XML so how can i get result in csv format?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2012 20:40:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-socket-programming-with-java-SDK/m-p/59285#M839</guid>
      <dc:creator>disha</dc:creator>
      <dc:date>2012-12-11T20:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk socket programming with java SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Splunk-socket-programming-with-java-SDK/m-p/59286#M840</link>
      <description>&lt;P&gt;Splunk Java SDK has a CSV Results Reader.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://github.com/splunk/splunk-sdk-java/tree/master/splunk-external/com/splunk/external"&gt;https://github.com/splunk/splunk-sdk-java/tree/master/splunk-external/com/splunk/external&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;These results readers are not part of the main SDK, but are included in the com.splunk.external module in the splunk-external.jar file. The JSON and CSV results readers also require third-party tokenizers for parsing (gson-2.1.jar and opencsv-2.3.jar)&lt;/P&gt;

&lt;P&gt;Specify output to be "csv" when submitting the search.&lt;/P&gt;

&lt;P&gt;Args queryArgs = new Args();&lt;BR /&gt;
queryArgs.put("output_mode", "csv");&lt;/P&gt;

&lt;P&gt;Code example here : &lt;A href="https://gist.github.com/3270825"&gt;https://gist.github.com/3270825&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2012 20:47:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Splunk-socket-programming-with-java-SDK/m-p/59286#M840</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2012-12-11T20:47:00Z</dc:date>
    </item>
  </channel>
</rss>

