<?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: add oneshot with host segment in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59147#M180075</link>
    <description>&lt;P&gt;What do you mean by "right result"? how big are the files? how many are there?&lt;/P&gt;</description>
    <pubDate>Tue, 28 Sep 2010 19:42:38 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2010-09-28T19:42:38Z</dc:date>
    <item>
      <title>add oneshot with host segment</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59143#M180071</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I need to re-index some data. In inputs.conf, host_segment parameter is configured as follows:&lt;/P&gt;

&lt;PRE&gt;
host_segment = 3
&lt;/PRE&gt;

&lt;P&gt;And I issued the following add oneshot command after deleting indexes using "| delete" command:&lt;/P&gt;

&lt;PRE&gt;
splunk add oneshot "/path/to/host1/file" -index myidx -sourcetype mytype
splunk add oneshot "/path/to/host2/file" -index myidx -sourcetype mytype
splunk add oneshot "/path/to/host3/file" -index myidx -sourcetype mytype
&lt;/PRE&gt;

&lt;P&gt;However, I got the following result:&lt;/P&gt;

&lt;P&gt;splunk search '* | top host'&lt;/P&gt;

&lt;PRE&gt;
host    count    percent
------ ------ ----------
myhost      5 100.000000
&lt;/PRE&gt;

&lt;P&gt;myhost is hostname of splunk server. I expected host1, host2 and host3 in the result.&lt;/P&gt;

&lt;P&gt;Could anyone help me retrieve host value using host_segment?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2010 10:31:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59143#M180071</guid>
      <dc:creator>melonman</dc:creator>
      <dc:date>2010-09-28T10:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: add oneshot with host segment</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59144#M180072</link>
      <description>&lt;P&gt;I issued the following,&lt;/P&gt;

&lt;PRE&gt;
splunk add oneshot "/path/to/host1/file" -index myidx -sourcetype mytype -host_segment 3
&lt;/PRE&gt;

&lt;P&gt;I didn't get the result immediately, but I could get correct result after 5 or 6 minutes. Is this expected behaivior? &lt;BR /&gt;
I would appreciate if anyone could also comment on this.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2010 10:57:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59144#M180072</guid>
      <dc:creator>melonman</dc:creator>
      <dc:date>2010-09-28T10:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: add oneshot with host segment</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59145#M180073</link>
      <description>&lt;P&gt;Seems to me if you're putting this in a script and you have the source or file name, it should not be that hard to get the correct host value and that as the argument to the &lt;CODE&gt;-host&lt;/CODE&gt; option, e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;for fn in `cat filelist.txt` ; do
  h=`echo $i | awk -F/ '{print $4}'`
  oneshot $i -host $h -index myidx -sourcetype mytype
done
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Sep 2010 12:02:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59145#M180073</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-09-28T12:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: add oneshot with host segment</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59146#M180074</link>
      <description>&lt;P&gt;yes, you are right. However, even with -host, it takes about 10 minutes to get the right result. Is it expected behavior? I thought data was indexed right after oneshot command issued.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2010 13:51:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59146#M180074</guid>
      <dc:creator>melonman</dc:creator>
      <dc:date>2010-09-28T13:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: add oneshot with host segment</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59147#M180075</link>
      <description>&lt;P&gt;What do you mean by "right result"? how big are the files? how many are there?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2010 19:42:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59147#M180075</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-09-28T19:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: add oneshot with host segment</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59148#M180076</link>
      <description>&lt;P&gt;After deleting and reindexing the same file, it takes some time to get the reindexed data to show up in the search result. Target file contains about 10 lines, and the number of them is 5.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2010 10:21:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59148#M180076</guid>
      <dc:creator>melonman</dc:creator>
      <dc:date>2010-09-29T10:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: add oneshot with host segment</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59149#M180077</link>
      <description>&lt;P&gt;This doesn't seem to have anything to do with host_segment&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2010 11:02:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59149#M180077</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-09-29T11:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: add oneshot with host segment</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59150#M180078</link>
      <description>&lt;P&gt;Quick confirmation, do you know if using add oneshot with -host_segment option is supported operation by splunk?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2010 16:12:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59150#M180078</guid>
      <dc:creator>melonman</dc:creator>
      <dc:date>2010-09-30T16:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: add oneshot with host segment</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59151#M180079</link>
      <description>&lt;P&gt;Yes, we support -host_segment option. We just need to add it in our doc and command help.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Oct 2010 07:04:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-oneshot-with-host-segment/m-p/59151#M180079</guid>
      <dc:creator>Masa</dc:creator>
      <dc:date>2010-10-02T07:04:11Z</dc:date>
    </item>
  </channel>
</rss>

