<?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: Dynamic list of Hostname in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Dynamic-list-of-Hostname/m-p/168653#M34131</link>
    <description>&lt;P&gt;HI ilyazs,&lt;BR /&gt;
if you want list of hostnames(host) with index names ,try this:&lt;/P&gt;

&lt;P&gt;source=logFile1 OR logFile2 |stats values(host) AS hostName values(index) AS indexName by source&lt;/P&gt;

&lt;P&gt;i suggest you to read this:&lt;/P&gt;

&lt;P&gt;docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Whatsinthismanual&lt;/P&gt;</description>
    <pubDate>Wed, 29 Apr 2015 16:19:34 GMT</pubDate>
    <dc:creator>stephane_cyrill</dc:creator>
    <dc:date>2015-04-29T16:19:34Z</dc:date>
    <item>
      <title>Dynamic list of Hostname</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Dynamic-list-of-Hostname/m-p/168652#M34130</link>
      <description>&lt;P&gt;I have 2 types of log files I want to fetch dynamic list of hostnames(host) with index name&lt;/P&gt;

&lt;P&gt;Log file1: &lt;BR /&gt;
index,sourcetype,host,entrypost&lt;BR /&gt;
aaa,123,10.12.13.14,text&lt;BR /&gt;
aaa,124,10.12.13.15,text&lt;BR /&gt;
aaa,126,10.12.13.16,text&lt;/P&gt;

&lt;P&gt;Log file2:&lt;BR /&gt;
index,sourcetype,host,entrypost&lt;BR /&gt;
bbb,141,10.12.13.20,text&lt;BR /&gt;
bbb,144,10.12.13.21,text&lt;BR /&gt;
bbb,148,10.12.13.22,text&lt;/P&gt;

&lt;P&gt;Suppose, if I select &lt;STRONG&gt;Index=aaa&lt;/STRONG&gt; then output list&lt;BR /&gt;
host&lt;BR /&gt;
10.12.13.14, &lt;BR /&gt;
10.12.13.15, &lt;BR /&gt;
10.12.13.16,.......&lt;/P&gt;

&lt;P&gt;if I select &lt;STRONG&gt;index=bbb&lt;/STRONG&gt; then output list &lt;BR /&gt;
host&lt;BR /&gt;
10.12.13.20, &lt;BR /&gt;
10.12.13.21, &lt;BR /&gt;
10.12.13.22,..............&lt;/P&gt;

&lt;P&gt;Eg: &lt;STRONG&gt;index=aaa sourcetype="&lt;EM&gt;" | eval host_name=if(index=aaa,"host=&lt;/EM&gt;","host=*") | chart count(sourcetype) as ST by host_name&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2015 15:47:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Dynamic-list-of-Hostname/m-p/168652#M34130</guid>
      <dc:creator>ilyazs</dc:creator>
      <dc:date>2015-04-29T15:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic list of Hostname</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Dynamic-list-of-Hostname/m-p/168653#M34131</link>
      <description>&lt;P&gt;HI ilyazs,&lt;BR /&gt;
if you want list of hostnames(host) with index names ,try this:&lt;/P&gt;

&lt;P&gt;source=logFile1 OR logFile2 |stats values(host) AS hostName values(index) AS indexName by source&lt;/P&gt;

&lt;P&gt;i suggest you to read this:&lt;/P&gt;

&lt;P&gt;docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Whatsinthismanual&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2015 16:19:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Dynamic-list-of-Hostname/m-p/168653#M34131</guid>
      <dc:creator>stephane_cyrill</dc:creator>
      <dc:date>2015-04-29T16:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic list of Hostname</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Dynamic-list-of-Hostname/m-p/168654#M34132</link>
      <description>&lt;P&gt;Hi Stephane,&lt;/P&gt;

&lt;P&gt;This query is not working as required output.&lt;/P&gt;

&lt;P&gt;Thanks for your suggestion, but query sample type which I want is not available in reference manual.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2015 11:06:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Dynamic-list-of-Hostname/m-p/168654#M34132</guid>
      <dc:creator>ilyazs</dc:creator>
      <dc:date>2015-04-30T11:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic list of Hostname</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Dynamic-list-of-Hostname/m-p/168655#M34133</link>
      <description>&lt;P&gt;can you be more explicit on what you want? what do you mean by dynamic hostname and index? can you provide a sample of the result you are expecting?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2015 15:47:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Dynamic-list-of-Hostname/m-p/168655#M34133</guid>
      <dc:creator>stephane_cyrill</dc:creator>
      <dc:date>2015-04-30T15:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic list of Hostname</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Dynamic-list-of-Hostname/m-p/168656#M34134</link>
      <description>&lt;P&gt;Sample Log files&lt;BR /&gt;
Log file1: &lt;BR /&gt;
index,sourcetype,host,entrypost&lt;BR /&gt;
aaa,123,10.12.13.14,text&lt;BR /&gt;
aaa,124,10.12.13.15,text&lt;BR /&gt;
aaa,126,10.12.13.16,text&lt;/P&gt;

&lt;P&gt;Log file2:&lt;BR /&gt;
index,sourcetype,host,entrypost&lt;BR /&gt;
bbb,141,10.12.13.20,text&lt;BR /&gt;
bbb,144,10.12.13.21,text&lt;BR /&gt;
bbb,148,10.12.13.22,text&lt;/P&gt;

&lt;P&gt;Expected Output:  Suppose, if I select Index=aaa then output list&lt;BR /&gt;
host&lt;BR /&gt;
10.12.13.14, &lt;BR /&gt;
10.12.13.15, &lt;BR /&gt;
10.12.13.16,.......&lt;/P&gt;

&lt;P&gt;if I select index=bbb then output list &lt;BR /&gt;
host&lt;BR /&gt;
10.12.13.20, &lt;BR /&gt;
10.12.13.21, &lt;BR /&gt;
10.12.13.22,..............&lt;/P&gt;

&lt;P&gt;Note: &lt;STRONG&gt;host&lt;/STRONG&gt; name is same in both log files&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2015 15:54:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Dynamic-list-of-Hostname/m-p/168656#M34134</guid>
      <dc:creator>ilyazs</dc:creator>
      <dc:date>2015-04-30T15:54:33Z</dc:date>
    </item>
  </channel>
</rss>

