<?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 Help with setting the hostname path on ~200 servers? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-setting-the-hostname-path-on-200-servers/m-p/313213#M58705</link>
    <description>&lt;P&gt;We are pushing out forwarders to over 200 servers this month. I intend to connect the forwarders to a deployment server and then push out the server.conf file using the below setup.&lt;/P&gt;

&lt;P&gt;[general]&lt;BR /&gt;
serverName = $HOSTNAME&lt;/P&gt;

&lt;P&gt;Since there are so many servers I do not want to manually set the hostname for each server. This seems to work but when I got to edit the inputs.conf file we have to monitor a server.log file that has the hostname before it.&lt;/P&gt;

&lt;P&gt;[monitor:///testarea/host1_server.log]&lt;/P&gt;

&lt;P&gt;I have tried setting "host1" to "$HOSTNAME" and "&lt;CODE&gt;hostname&lt;/CODE&gt;". All which return the actual we are trying to monitor &lt;/P&gt;

&lt;P&gt;When doing a ls -ltr on /testarea/$HOSTNAME_server.log it returns /testarea/host1_server.log. &lt;/P&gt;

&lt;P&gt;Is Splunk able to do this?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:34:59 GMT</pubDate>
    <dc:creator>FIS1</dc:creator>
    <dc:date>2020-09-29T15:34:59Z</dc:date>
    <item>
      <title>Help with setting the hostname path on ~200 servers?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-setting-the-hostname-path-on-200-servers/m-p/313213#M58705</link>
      <description>&lt;P&gt;We are pushing out forwarders to over 200 servers this month. I intend to connect the forwarders to a deployment server and then push out the server.conf file using the below setup.&lt;/P&gt;

&lt;P&gt;[general]&lt;BR /&gt;
serverName = $HOSTNAME&lt;/P&gt;

&lt;P&gt;Since there are so many servers I do not want to manually set the hostname for each server. This seems to work but when I got to edit the inputs.conf file we have to monitor a server.log file that has the hostname before it.&lt;/P&gt;

&lt;P&gt;[monitor:///testarea/host1_server.log]&lt;/P&gt;

&lt;P&gt;I have tried setting "host1" to "$HOSTNAME" and "&lt;CODE&gt;hostname&lt;/CODE&gt;". All which return the actual we are trying to monitor &lt;/P&gt;

&lt;P&gt;When doing a ls -ltr on /testarea/$HOSTNAME_server.log it returns /testarea/host1_server.log. &lt;/P&gt;

&lt;P&gt;Is Splunk able to do this?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:34:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-setting-the-hostname-path-on-200-servers/m-p/313213#M58705</guid>
      <dc:creator>FIS1</dc:creator>
      <dc:date>2020-09-29T15:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help with setting the hostname path on ~200 servers?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-setting-the-hostname-path-on-200-servers/m-p/313214#M58706</link>
      <description>&lt;P&gt;Why wouldnt you just use a wildcard in your monitor stanza?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///testarea/*_server.log]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Aug 2017 18:52:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-setting-the-hostname-path-on-200-servers/m-p/313214#M58706</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-08-30T18:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help with setting the hostname path on ~200 servers?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-setting-the-hostname-path-on-200-servers/m-p/313215#M58707</link>
      <description>&lt;P&gt;You can run during the install process something like the following command - &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/splunk/splunkforwarder/bin/splunk set default-hostname &amp;lt;host&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Aug 2017 18:57:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-setting-the-hostname-path-on-200-servers/m-p/313215#M58707</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2017-08-30T18:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with setting the hostname path on ~200 servers?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-setting-the-hostname-path-on-200-servers/m-p/313216#M58708</link>
      <description>&lt;P&gt;Thanks jkat54 ... smh not sure why i was thinking i needed to get hostname for that path as that is the only file that ends with _server.log. &lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2017 20:28:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-setting-the-hostname-path-on-200-servers/m-p/313216#M58708</guid>
      <dc:creator>FIS1</dc:creator>
      <dc:date>2017-08-30T20:28:59Z</dc:date>
    </item>
  </channel>
</rss>

