<?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: Can a sourcetype be applied on the server, or does it need to be applied in the forwarder? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-a-sourcetype-be-applied-on-the-server-or-does-it-need-to-be/m-p/60746#M12084</link>
    <description>&lt;P&gt;you should put it in inputs.conf, like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:////.../name-of-my-log1.log]
host = your_host_name
sourcetype = your_sourcetype_name
source = your_source_name
index = your_index_name

[monitor:///.../name-of-my-log2.log]
...
...
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or you can reassign sourcetype by data routing in props.conf and transforms.conf like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;in props.conf
[your sourcetype name]
TRANSFORMS-XXXSourcetyping = XXXSourcetyping

in transforms.conf
[XXXSourcetyping]
REGEX = yourREGEX
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::your_sourcetype_name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 Aug 2011 09:13:04 GMT</pubDate>
    <dc:creator>hjwang</dc:creator>
    <dc:date>2011-08-19T09:13:04Z</dc:date>
    <item>
      <title>Can a sourcetype be applied on the server, or does it need to be applied in the forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-a-sourcetype-be-applied-on-the-server-or-does-it-need-to-be/m-p/60745#M12083</link>
      <description>&lt;P&gt;I am trying to set up a universal forwarder with an inputs.conf which only contains something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///path/to/my/logs]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then have the splunk server apply different sourcetype values to specific logs within that directory with a rule in props.conf like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::.../name-of-my-log.log...]
sourcetype = my_sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, that does not seem to work.  Does the sourcetype need to be defined in inputs.conf on the forwarder machine?  Is the syntax of my props.conf correct?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2011 08:12:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-a-sourcetype-be-applied-on-the-server-or-does-it-need-to-be/m-p/60745#M12083</guid>
      <dc:creator>wtanaka</dc:creator>
      <dc:date>2011-08-19T08:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can a sourcetype be applied on the server, or does it need to be applied in the forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-a-sourcetype-be-applied-on-the-server-or-does-it-need-to-be/m-p/60746#M12084</link>
      <description>&lt;P&gt;you should put it in inputs.conf, like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:////.../name-of-my-log1.log]
host = your_host_name
sourcetype = your_sourcetype_name
source = your_source_name
index = your_index_name

[monitor:///.../name-of-my-log2.log]
...
...
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or you can reassign sourcetype by data routing in props.conf and transforms.conf like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;in props.conf
[your sourcetype name]
TRANSFORMS-XXXSourcetyping = XXXSourcetyping

in transforms.conf
[XXXSourcetyping]
REGEX = yourREGEX
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::your_sourcetype_name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Aug 2011 09:13:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-a-sourcetype-be-applied-on-the-server-or-does-it-need-to-be/m-p/60746#M12084</guid>
      <dc:creator>hjwang</dc:creator>
      <dc:date>2011-08-19T09:13:04Z</dc:date>
    </item>
  </channel>
</rss>

