<?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: sourcetype based upon host in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/510010#M86727</link>
    <description>&lt;P&gt;better use this one&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/Using-props-transforms-to-assign-sourcetype-and-extract-fields/td-p/97512" target="_blank"&gt;https://community.splunk.com/t5/Getting-Data-In/Using-props-transforms-to-assign-sourcetype-and-extract-fields/td-p/97512&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jul 2020 10:13:43 GMT</pubDate>
    <dc:creator>mkalyakin</dc:creator>
    <dc:date>2020-07-20T10:13:43Z</dc:date>
    <item>
      <title>Is it possible to dynamically change sourcetype based upon host?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46762#M8830</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a logfile that contains lots of hosts (coming in from syslog). I want to dynamically change the sourcetype based upon the host value. (It has to be host, not just text in the stream). Is this possible? Not that there are numerous other inputs coming in on this system, some of which also contain these same hosts, but I don't want them included in this setup.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 15:54:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46762#M8830</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2022-10-27T15:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: sourcetype based upon host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46763#M8831</link>
      <description>&lt;P&gt;You can match a host in props.conf and set a source type.  Host stanzas override sourcetype stanza.&lt;/P&gt;

&lt;P&gt;[syslog]&lt;BR /&gt;&lt;BR /&gt;
blah blah &lt;/P&gt;

&lt;P&gt;[host::myserver*]&lt;BR /&gt;
sourcetype=special_sourcetype&lt;/P&gt;

&lt;P&gt;Even though the event came in as syslog,  as long as the host stanza matches it will override syslog.&lt;/P&gt;

&lt;P&gt;Here is the props.conf spec for more info:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/latest/admin/Propsconf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 02:13:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46763#M8831</guid>
      <dc:creator>okrabbe_splunk</dc:creator>
      <dc:date>2013-05-28T02:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: sourcetype based upon host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46764#M8832</link>
      <description>&lt;P&gt;Is the host stanza a sub-set of the syslog stanza? I have other inputs that will have the same hosts, but I don't want those modified.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 10:28:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46764#M8832</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2013-05-28T10:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: sourcetype based upon host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46765#M8833</link>
      <description>&lt;P&gt;ok, if you need it dependent you can try this.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;P&gt;[syslog]&lt;BR /&gt;
TRANSFORMS-set_sourcetype = set_sourcetype&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;P&gt;[set_sourcetype]&lt;BR /&gt;
FORMAT = new_sourcetype&lt;BR /&gt;
REGEX = myserver&lt;BR /&gt;
SOURCE_KEY = MetaData:Host&lt;BR /&gt;
DEST_KEY = MetaData:Sourcetype&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:59:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46765#M8833</guid>
      <dc:creator>okrabbe_splunk</dc:creator>
      <dc:date>2020-09-28T13:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: sourcetype based upon host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46766#M8834</link>
      <description>&lt;P&gt;Thanks. One last question - would it be possible to do this based upon a lookup? I did a search, but I don't see any examples of this being done.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 15:08:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46766#M8834</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2013-05-28T15:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: sourcetype based upon host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46767#M8835</link>
      <description>&lt;P&gt;Unfortunately I do not know of a way to do this based on a lookup.  &lt;/P&gt;

&lt;P&gt;One thing I would say though is that sometimes it is easier to fix this on the way in rather than trying to fix it in Splunk.  &lt;/P&gt;

&lt;P&gt;Many times people will have their syslog receiver split out the syslog into different directories based on hosts and then you would just configure the SPlunk forwarder to map these directories to source types.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2013 19:05:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46767#M8835</guid>
      <dc:creator>okrabbe_splunk</dc:creator>
      <dc:date>2013-05-28T19:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: sourcetype based upon host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46768#M8836</link>
      <description>&lt;P&gt;Thanks. Yes, I'm doing that on a linux system, but this is legacy stuff running on Solaris, and uses standard syslog daemons. Thanks for all the info.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2013 00:34:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/46768#M8836</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2013-05-29T00:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: sourcetype based upon host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/510010#M86727</link>
      <description>&lt;P&gt;better use this one&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/Using-props-transforms-to-assign-sourcetype-and-extract-fields/td-p/97512" target="_blank"&gt;https://community.splunk.com/t5/Getting-Data-In/Using-props-transforms-to-assign-sourcetype-and-extract-fields/td-p/97512&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 10:13:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/510010#M86727</guid>
      <dc:creator>mkalyakin</dc:creator>
      <dc:date>2020-07-20T10:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: sourcetype based upon host</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/618605#M106726</link>
      <description>&lt;P&gt;This does not work anymore. I'm not sure if it would have ever worked, but according to the documentation sourcetype=something only works when applied to a source. A transforms.conf file is needed. The example given in another reply almost works, it was missing the "sourcetype::" on the FORMAT line.&lt;/P&gt;&lt;P&gt;[syslog]&lt;BR /&gt;TRANSFORMS-set_sourcetype = set_sourcetype&lt;/P&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;P&gt;[set_sourcetype]&lt;BR /&gt;FORMAT = sourcetype::new_sourcetype&lt;BR /&gt;REGEX = myserver&lt;BR /&gt;SOURCE_KEY = MetaData:Host&lt;BR /&gt;DEST_KEY = MetaData:Sourcetype&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 15:35:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-dynamically-change-sourcetype-based-upon-host/m-p/618605#M106726</guid>
      <dc:creator>jfaldmomacu</dc:creator>
      <dc:date>2022-10-27T15:35:54Z</dc:date>
    </item>
  </channel>
</rss>

