<?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 Host attribute for com.splunk.Index.upload in java SDK in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Host-attribute-for-com-splunk-Index-upload-in-java-SDK/m-p/168707#M34152</link>
    <description>&lt;P&gt;Is there a way to pass host attribute value for oneshot upload in java sdk for splunk?&lt;/P&gt;

&lt;P&gt;The example on splunk documentation shows that valid parameters for oneshot upload include both host_regex and host.&lt;/P&gt;

&lt;P&gt;Any way I can set it for index.upload? The only parameter that it currently accepts is the path of the file to be uploaded&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2013 22:07:58 GMT</pubDate>
    <dc:creator>tanmaybalwa</dc:creator>
    <dc:date>2013-12-05T22:07:58Z</dc:date>
    <item>
      <title>Host attribute for com.splunk.Index.upload in java SDK</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-attribute-for-com-splunk-Index-upload-in-java-SDK/m-p/168707#M34152</link>
      <description>&lt;P&gt;Is there a way to pass host attribute value for oneshot upload in java sdk for splunk?&lt;/P&gt;

&lt;P&gt;The example on splunk documentation shows that valid parameters for oneshot upload include both host_regex and host.&lt;/P&gt;

&lt;P&gt;Any way I can set it for index.upload? The only parameter that it currently accepts is the path of the file to be uploaded&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2013 22:07:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-attribute-for-com-splunk-Index-upload-in-java-SDK/m-p/168707#M34152</guid>
      <dc:creator>tanmaybalwa</dc:creator>
      <dc:date>2013-12-05T22:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Host attribute for com.splunk.Index.upload in java SDK</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-attribute-for-com-splunk-Index-upload-in-java-SDK/m-p/168708#M34153</link>
      <description>&lt;P&gt;I saw the source for upload: &lt;BR /&gt;
public void upload(String filename) { &lt;BR /&gt;
EntityCollection uploads = service.getUploads(); &lt;BR /&gt;
Args args = new Args("index", getName());&lt;BR /&gt;
uploads.create(filename, args); }&lt;/P&gt;

&lt;P&gt;I think that the change should be: &lt;BR /&gt;
public void upload(String filename, String hostname) { &lt;BR /&gt;
EntityCollection uploads = service.getUploads();&lt;BR /&gt;
Args args = new Args("index", getName());&lt;BR /&gt;
Args.put("host", hostname);&lt;BR /&gt;
uploads.create(filename, args); } &lt;BR /&gt;
Would this work?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2013 22:27:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-attribute-for-com-splunk-Index-upload-in-java-SDK/m-p/168708#M34153</guid>
      <dc:creator>tanmaybalwa</dc:creator>
      <dc:date>2013-12-05T22:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Host attribute for com.splunk.Index.upload in java SDK</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-attribute-for-com-splunk-Index-upload-in-java-SDK/m-p/168709#M34154</link>
      <description>&lt;P&gt;Thank you for reporting this. This is a current limitation of the SDK, but I went and filed a bug for it here:&lt;BR /&gt;
&lt;A href="https://github.com/splunk/splunk-sdk-java/issues/58"&gt;https://github.com/splunk/splunk-sdk-java/issues/58&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You can track the status there, and I'll also update here when we've fixed it.&lt;/P&gt;

&lt;P&gt;In the meantime, your proposed fix would work. You should feel free to make a local change to the SDK and compile it until we've fixed it in the official version.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2013 23:33:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-attribute-for-com-splunk-Index-upload-in-java-SDK/m-p/168709#M34154</guid>
      <dc:creator>ineeman</dc:creator>
      <dc:date>2013-12-05T23:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Host attribute for com.splunk.Index.upload in java SDK</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-attribute-for-com-splunk-Index-upload-in-java-SDK/m-p/168710#M34155</link>
      <description>&lt;P&gt;Thanks for blessing the change! Will proceed with compiling the SDK with the modification.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2013 23:44:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-attribute-for-com-splunk-Index-upload-in-java-SDK/m-p/168710#M34155</guid>
      <dc:creator>tanmaybalwa</dc:creator>
      <dc:date>2013-12-05T23:44:52Z</dc:date>
    </item>
  </channel>
</rss>

