<?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: Renaming Host Dynamically in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63388#M12722</link>
    <description>&lt;P&gt;there are multiple log files in the directory and they are being assigned a sourcetype in the props.conf dynamically...I tried to simplify the information because I didn't think it was relevant...I will add the stanza&lt;/P&gt;</description>
    <pubDate>Tue, 18 Sep 2012 14:59:20 GMT</pubDate>
    <dc:creator>peter_gianusso</dc:creator>
    <dc:date>2012-09-18T14:59:20Z</dc:date>
    <item>
      <title>Renaming Host Dynamically</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63385#M12719</link>
      <description>&lt;P&gt;Trying to assign the "esxi_hosts" sourcetype to any event that has a value of "vm[0-9][0-9]" for the host field:&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://\\njros1bva0597\d$\LogFiles\W3SVC1\]
disabled = 0
host = VM99
index=imaging
whitelist = \.log$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::...\\ex*.log] 
sourcetype = VM88

[source::...\\CAPPM*.log] 
sourcetype = VM11
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;[VM88]&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TRANSFORMS-hostname = rewrite_sourcetype_from_host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[rewrite_sourcetype_from_host]
SOURCE_KEY = MetaData:Host
REGEX = vm\d\d
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::esxi_hosts
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Sep 2012 14:37:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63385#M12719</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-18T14:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Host Dynamically</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63386#M12720</link>
      <description>&lt;P&gt;source type always ends up as VM88&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 14:39:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63386#M12720</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-18T14:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Host Dynamically</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63387#M12721</link>
      <description>&lt;P&gt;maybe I'm missing something... can't you just set the sourcetype in the monitor stanza in inputs.conf&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[monitor]&lt;BR /&gt;
sourcetype=esxi_hosts&lt;BR /&gt;
blah blah&lt;BR /&gt;
blah&lt;BR /&gt;
etc.&lt;BR /&gt;
etc.&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 14:56:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63387#M12721</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-09-18T14:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Host Dynamically</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63388#M12722</link>
      <description>&lt;P&gt;there are multiple log files in the directory and they are being assigned a sourcetype in the props.conf dynamically...I tried to simplify the information because I didn't think it was relevant...I will add the stanza&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 14:59:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63388#M12722</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-18T14:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Host Dynamically</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63389#M12723</link>
      <description>&lt;P&gt;let us know if this fixes the issue, and i will convert Kristian's comment to an answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 18:17:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63389#M12723</guid>
      <dc:creator>piebob</dc:creator>
      <dc:date>2012-09-18T18:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Host Dynamically</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63390#M12724</link>
      <description>&lt;P&gt;no that won't fix the issue given the scenario...the source type is dynamically assigned in the props.conf&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 18:18:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63390#M12724</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-18T18:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming Host Dynamically</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63391#M12725</link>
      <description>&lt;P&gt;a fix to the regex of &lt;BR /&gt;
     vm\d\d &lt;BR /&gt;
 to &lt;BR /&gt;
    VM\d\d &lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
&lt;/CODE&gt;fixed the issue&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 18:19:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Renaming-Host-Dynamically/m-p/63391#M12725</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-18T18:19:37Z</dc:date>
    </item>
  </channel>
</rss>

