<?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: How can I push a comma separated line of fields to Splunk using the Java SDK? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-push-a-comma-separated-line-of-fields-to-Splunk-using/m-p/146853#M29926</link>
    <description>&lt;P&gt;You need the &lt;CODE&gt;oneshot&lt;/CODE&gt; command; read about it here:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.4/Data/MonitorfilesanddirectoriesusingtheCLI"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.4/Data/MonitorfilesanddirectoriesusingtheCLI&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Aug 2015 13:06:12 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-08-03T13:06:12Z</dc:date>
    <item>
      <title>How can I push a comma separated line of fields to Splunk using the Java SDK?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-push-a-comma-separated-line-of-fields-to-Splunk-using/m-p/146852#M29925</link>
      <description>&lt;P&gt;I have a Java program that reads in a CSV and prints off lines where one field has a certain value, and want to set it up so that the lines are instead sent to a Splunk Light server sitting on localhost. I've managed to manually send data using curl and am looking for a simple example to replicate that functionality using the Java Splunk SDK.&lt;/P&gt;

&lt;P&gt;My curl script (fields obfuscated):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin "localhost:8089/services/receivers/simple?source=www&amp;amp;sourcetype=csv" -d "field1,field2,field3,field4,field5,field6,field7"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Again, is there any way for me to replicate the same functionality of the above curl script in Java? All the tutorials I'm finding have to do with remotely executing searches and contain no useful information about pushing data to the server.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2015 13:55:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-push-a-comma-separated-line-of-fields-to-Splunk-using/m-p/146852#M29925</guid>
      <dc:creator>rbkaspr</dc:creator>
      <dc:date>2015-07-29T13:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I push a comma separated line of fields to Splunk using the Java SDK?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-push-a-comma-separated-line-of-fields-to-Splunk-using/m-p/146853#M29926</link>
      <description>&lt;P&gt;You need the &lt;CODE&gt;oneshot&lt;/CODE&gt; command; read about it here:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.4/Data/MonitorfilesanddirectoriesusingtheCLI"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.4/Data/MonitorfilesanddirectoriesusingtheCLI&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2015 13:06:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-push-a-comma-separated-line-of-fields-to-Splunk-using/m-p/146853#M29926</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-03T13:06:12Z</dc:date>
    </item>
  </channel>
</rss>

