<?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 set host for TCP input to deploy client machine? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41296#M7675</link>
    <description>&lt;P&gt;The problem is that connections from the same machine (localhost) would not appear as the hostname from dns.  It happens to be the case that all connections to this input are from localhost, so the following is an acceptable solution. &lt;/P&gt;

&lt;P&gt;[tcp://12345] &lt;BR /&gt;
connection_host = none # you need this&lt;BR /&gt;
sourcetype = log4j &lt;BR /&gt;
source = mysource &lt;BR /&gt;
host = $decideOnStartup # and this&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2013 01:48:05 GMT</pubDate>
    <dc:creator>juniormint</dc:creator>
    <dc:date>2013-08-29T01:48:05Z</dc:date>
    <item>
      <title>How can I set host for TCP input to deploy client machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41289#M7668</link>
      <description>&lt;P&gt;I'm using the configuration deployment server to manage a bunch of forwarders.  One of the apps that they get has inputs.conf with a stanza like this&lt;/P&gt;

&lt;P&gt;[tcp://12345] &lt;BR /&gt;
connection_host = dns &lt;BR /&gt;
sourcetype = log4j &lt;BR /&gt;
source = mysource &lt;/P&gt;

&lt;P&gt;I would like to do something to override the host to the forwarder machine address, but don't know if its possible. How would do this?  Seems like it should be accessible since its effectively a constant.&lt;/P&gt;

&lt;P&gt;[tcp://12345] &lt;BR /&gt;
connection_host = dns &lt;BR /&gt;
sourcetype = log4j &lt;BR /&gt;
source = mysource &lt;BR /&gt;
host = THISMACHINE&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2013 02:29:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41289#M7668</guid>
      <dc:creator>juniormint</dc:creator>
      <dc:date>2013-08-21T02:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set host for TCP input to deploy client machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41290#M7669</link>
      <description>&lt;P&gt;forgot to mention these are windows machines&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2013 02:31:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41290#M7669</guid>
      <dc:creator>juniormint</dc:creator>
      <dc:date>2013-08-21T02:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set host for TCP input to deploy client machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41291#M7670</link>
      <description>&lt;P&gt;You should not need to.  Splunk relies on being able to determine the hostname from the inherent  network configuration.  It is a static part of the local machine configuration, not part of the generic app.  At worst you could create local configs for each forwarder at install time (in $SPLUNK_HOME/etc/system/local) which in the absence of anything else will be taken as static value.&lt;/P&gt;

&lt;P&gt;The Splunk configuration model is layered, allowing application configurations to override specific static default and static local configuration elements.  Deployed configurations should only contain those elements which are generic and dynamic.&lt;/P&gt;

&lt;P&gt;The Splunk deployment I manage used to have a lot more forwarder endpoints than it does now, relying as it did on cluster deployments.  The hostname was never a factor.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2013 03:10:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41291#M7670</guid>
      <dc:creator>grijhwani</dc:creator>
      <dc:date>2013-08-21T03:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set host for TCP input to deploy client machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41292#M7671</link>
      <description>&lt;P&gt;I am not quite following.  My guess is that that what I have above in my app will use the host data of what is connecting to the TCP input.  What I want is to override and use the hostname of the forwarder.  &lt;/P&gt;

&lt;P&gt;I get that I can do the following and the host field will be set to "THISMACHINE"  but what I want is something like host = %HOSTNAME%. Is is possible to do this? &lt;/P&gt;

&lt;P&gt;[tcp://12345] &lt;BR /&gt;
connection_host = dns &lt;BR /&gt;
sourcetype = log4j &lt;BR /&gt;
source = mysource &lt;BR /&gt;
host = THISMACHINE&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2013 12:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41292#M7671</guid>
      <dc:creator>juniormint</dc:creator>
      <dc:date>2013-08-21T12:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set host for TCP input to deploy client machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41293#M7672</link>
      <description>&lt;P&gt;Seems like this is what I am seeking&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsc"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsc&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;host = &lt;STRING&gt;&lt;/STRING&gt;&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;If set to '$decideOnStartup', will be interpreted as hostname of executing machine;
such interpretation will occur on each splunkd startup.  This is the default.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 21 Aug 2013 12:37:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41293#M7672</guid>
      <dc:creator>juniormint</dc:creator>
      <dc:date>2013-08-21T12:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set host for TCP input to deploy client machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41294#M7673</link>
      <description>&lt;P&gt;Sounds like this should do it:&lt;BR /&gt;
[tcp://12345]&lt;BR /&gt;
connection_host = none&lt;BR /&gt;
sourcetype = log4j&lt;BR /&gt;
source = mysource&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2013 12:43:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41294#M7673</guid>
      <dc:creator>jtacy</dc:creator>
      <dc:date>2013-08-21T12:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set host for TCP input to deploy client machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41295#M7674</link>
      <description>&lt;P&gt;The "forwarder" is the client forwarding logs to the indexer.  Ordinarily this will be the initial source agent.  Are you saying that in your case you have your generating source talking to an intermediate forwarder, which then passes logs on to the indexer, and it is this intermediary that you want recorded in the index as the source?  If that is the case, you are talking about using "transforms" on the intermediary.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2013 13:33:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41295#M7674</guid>
      <dc:creator>grijhwani</dc:creator>
      <dc:date>2013-08-21T13:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set host for TCP input to deploy client machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41296#M7675</link>
      <description>&lt;P&gt;The problem is that connections from the same machine (localhost) would not appear as the hostname from dns.  It happens to be the case that all connections to this input are from localhost, so the following is an acceptable solution. &lt;/P&gt;

&lt;P&gt;[tcp://12345] &lt;BR /&gt;
connection_host = none # you need this&lt;BR /&gt;
sourcetype = log4j &lt;BR /&gt;
source = mysource &lt;BR /&gt;
host = $decideOnStartup # and this&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2013 01:48:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-set-host-for-TCP-input-to-deploy-client-machine/m-p/41296#M7675</guid>
      <dc:creator>juniormint</dc:creator>
      <dc:date>2013-08-29T01:48:05Z</dc:date>
    </item>
  </channel>
</rss>

