<?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: Specifiy input stanzas by host in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Specifiy-input-stanzas-by-host/m-p/513675#M87103</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/64297"&gt;@esalmon&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if the hostname is in the path of the files to monitor (e.g. /data/host1/logs), you can see in the documentation&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.5/Admin/Inputsconf" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.5/Admin/Inputsconf&lt;/A&gt;&amp;nbsp;the &lt;STRONG&gt;host_segment&lt;/STRONG&gt; option:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host_segment = &amp;lt;integer&amp;gt;
* If set to N, Splunk software sets the Nth "/"-separated segment of the path
  as 'host'.
    * For example, if host_segment=3, the third segment is used.
* If the value is not an integer or is less than 1, the default 'host'
  setting is used.
* On Windows machines, the drive letter and colon before the backslash count
  as one segment.
    * For example, if you set host_segment=3 and the monitor path is
      D:\logs\servers\host01, Splunk software sets the host as "servers" because
      that is the third segment.
* No default.&lt;/LI-CODE&gt;&lt;P&gt;If instead the hostname isn't explicitly in the path but it depends on it, you have to create two stanzas with two different host defiitions.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 12 Aug 2020 07:50:05 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2020-08-12T07:50:05Z</dc:date>
    <item>
      <title>Specifiy input stanzas by host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Specifiy-input-stanzas-by-host/m-p/513647#M87096</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I've created an app to be able to monitor some directories for two hosts. The stanzas are completely identical except for the directory path. Is there a way to specify in the inputs.conf which host uses which stanza?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 23:54:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Specifiy-input-stanzas-by-host/m-p/513647#M87096</guid>
      <dc:creator>esalmon</dc:creator>
      <dc:date>2020-08-11T23:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Specifiy input stanzas by host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Specifiy-input-stanzas-by-host/m-p/513675#M87103</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/64297"&gt;@esalmon&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if the hostname is in the path of the files to monitor (e.g. /data/host1/logs), you can see in the documentation&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.5/Admin/Inputsconf" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.5/Admin/Inputsconf&lt;/A&gt;&amp;nbsp;the &lt;STRONG&gt;host_segment&lt;/STRONG&gt; option:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host_segment = &amp;lt;integer&amp;gt;
* If set to N, Splunk software sets the Nth "/"-separated segment of the path
  as 'host'.
    * For example, if host_segment=3, the third segment is used.
* If the value is not an integer or is less than 1, the default 'host'
  setting is used.
* On Windows machines, the drive letter and colon before the backslash count
  as one segment.
    * For example, if you set host_segment=3 and the monitor path is
      D:\logs\servers\host01, Splunk software sets the host as "servers" because
      that is the third segment.
* No default.&lt;/LI-CODE&gt;&lt;P&gt;If instead the hostname isn't explicitly in the path but it depends on it, you have to create two stanzas with two different host defiitions.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 07:50:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Specifiy-input-stanzas-by-host/m-p/513675#M87103</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-08-12T07:50:05Z</dc:date>
    </item>
  </channel>
</rss>

