<?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 How to define a source type in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-define-a-source-type/m-p/547789#M155342</link>
    <description>&lt;P&gt;I have a requirement to add new data format to splunk . Below is the sample data . If i want to setup a new sourcetype based on the field 'InputType', what are the changes required in the props.conf file and transforms.conf file ? I want the sourcetype to display the values aMG, zRP or bKL&lt;/P&gt;&lt;P&gt;&lt;U&gt;Sample data&lt;/U&gt;&lt;/P&gt;&lt;P&gt;InputType="aMG"|filename &amp;lt;K............&lt;/P&gt;&lt;P&gt;InputType="zRP"{dataformat..&amp;gt;...........&lt;/P&gt;&lt;P&gt;InputType="bKL"$%mo &amp;lt;&amp;lt; ........&lt;/P&gt;&lt;P&gt;InputType="aMG"\dataformat.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Apr 2021 20:51:13 GMT</pubDate>
    <dc:creator>ethanthomas</dc:creator>
    <dc:date>2021-04-13T20:51:13Z</dc:date>
    <item>
      <title>How to define a source type</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-define-a-source-type/m-p/547789#M155342</link>
      <description>&lt;P&gt;I have a requirement to add new data format to splunk . Below is the sample data . If i want to setup a new sourcetype based on the field 'InputType', what are the changes required in the props.conf file and transforms.conf file ? I want the sourcetype to display the values aMG, zRP or bKL&lt;/P&gt;&lt;P&gt;&lt;U&gt;Sample data&lt;/U&gt;&lt;/P&gt;&lt;P&gt;InputType="aMG"|filename &amp;lt;K............&lt;/P&gt;&lt;P&gt;InputType="zRP"{dataformat..&amp;gt;...........&lt;/P&gt;&lt;P&gt;InputType="bKL"$%mo &amp;lt;&amp;lt; ........&lt;/P&gt;&lt;P&gt;InputType="aMG"\dataformat.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 20:51:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-define-a-source-type/m-p/547789#M155342</guid>
      <dc:creator>ethanthomas</dc:creator>
      <dc:date>2021-04-13T20:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to define a source type</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-define-a-source-type/m-p/547826#M155348</link>
      <description>&lt;P&gt;&amp;nbsp;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232260"&gt;@ethanthomas&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Below should work for you, please &lt;STRONG&gt;input_sourcetype&lt;/STRONG&gt; stanza with yours.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;transforms.conf

[update_sourcetype]
REGEX = InputType=\"([^\"]+)
FORMAT = sourcetype::$1
DEST_KEY = MetaData:Sourcetype

props.conf

[input_sourcetype]
TRANSFORMS-sourcetype_override = update_sourcetype&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;For reference your can check below docs link;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.2/Data/Advancedsourcetypeoverrides#Override_source_types_on_a_per-event_basis" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.1.2/Data/Advancedsourcetypeoverrides#Override_source_types_on_a_per-event_basis&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 03:55:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-define-a-source-type/m-p/547826#M155348</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-04-14T03:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to define a source type</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-define-a-source-type/m-p/548514#M155588</link>
      <description>&lt;P&gt;I have used exactly the same . However , the sourcetype is still the value defined in the input.conf file . Any issues ? Do i need to change anything in the input .conf file ? I removed the sourcetype in the Input.conf file , but on that case the sourcetype changes to the default value tcp-raw. Please help&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 22:30:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-define-a-source-type/m-p/548514#M155588</guid>
      <dc:creator>ethanthomas</dc:creator>
      <dc:date>2021-04-19T22:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to define a source type</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-define-a-source-type/m-p/548711#M155669</link>
      <description>&lt;P&gt;You should put a sourcetype in your inputs.conf. Did you put these props and transforms to indexers? Or if there is a Heavy Forwarder between, you have to put it there. Could you please share your props, transforms and inputs.conf settings? Also infor about your setup, UF, HF and indexers.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 03:33:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-define-a-source-type/m-p/548711#M155669</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-04-21T03:33:33Z</dc:date>
    </item>
  </channel>
</rss>

