<?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: Why is source type override based on host not working? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390702#M94145</link>
    <description>&lt;P&gt;Hi @siva_cg,&lt;/P&gt;

&lt;P&gt;Your configuration is not correct to set sourcetype, look at answer given by me on this question &lt;A href="https://answers.splunk.com/answers/686241/metadata-transforms-not-being-applied-after-series-1.html#answer-687394"&gt;https://answers.splunk.com/answers/686241/metadata-transforms-not-being-applied-after-series-1.html#answer-687394&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Try to set transforms.conf like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[index1_host1]
REGEX = host1
SOURCE_KEY = MetaData:Host
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::sourcetype1

[index1_host2]
REGEX = host2
SOURCE_KEY = MetaData:Host
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::sourcetype2

[index1_host3]
REGEX = host3
SOURCE_KEY = MetaData:Host
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::sourcetype3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 26 Sep 2018 11:40:11 GMT</pubDate>
    <dc:creator>harsmarvania57</dc:creator>
    <dc:date>2018-09-26T11:40:11Z</dc:date>
    <item>
      <title>Why is source type override based on host not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390698#M94141</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have some switch logs which are configured to Splunk from 3 Universal Forwarders into one index. Based on host values, I renamed the source type by configuring props and transforms. I am able to see new source types in the index, but now the issue is when I search for that particular source type, it is not giving results.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = index1 ----giving results and able to see sourcetypes in the field values as expected
index = index1 sourcetype = sourcetype1 ----- no results
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
[orig_sourcetype]&lt;BR /&gt;
TRANSFORMS-rename = index1_host1,index1_host2,index1_host3&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
[index1_host1]&lt;BR /&gt;
REGEX = host1&lt;BR /&gt;
SOURCE_KEY = MetaData:Host&lt;BR /&gt;
DEST_KEY = MetaData:Sourcetype&lt;BR /&gt;
FORMAT = sourcetype1&lt;BR /&gt;
WRITE_META = true&lt;/P&gt;

&lt;P&gt;[index1_host2]&lt;BR /&gt;
REGEX = host2&lt;BR /&gt;
SOURCE_KEY = MetaData:Host&lt;BR /&gt;
DEST_KEY = MetaData:Sourcetype&lt;BR /&gt;
FORMAT = sourcetype2&lt;BR /&gt;
WRITE_META = true&lt;/P&gt;

&lt;P&gt;[index1_host3]&lt;BR /&gt;
REGEX = host3&lt;BR /&gt;
SOURCE_KEY = MetaData:Host&lt;BR /&gt;
DEST_KEY = MetaData:Sourcetype&lt;BR /&gt;
FORMAT = sourcetype3&lt;BR /&gt;
WRITE_META = true&lt;/P&gt;

&lt;P&gt;Did I miss any configurations? Could any one please help? Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:22:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390698#M94141</guid>
      <dc:creator>siva_cg</dc:creator>
      <dc:date>2020-09-29T21:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why is source type override based on host not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390699#M94142</link>
      <description>&lt;P&gt;Looks really clean @siva_cg, I wonder which log file tracks the &lt;CODE&gt;transforms.conf&lt;/CODE&gt; work...&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 13:35:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390699#M94142</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2018-09-24T13:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why is source type override based on host not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390700#M94143</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/198661"&gt;@siva_cg&lt;/a&gt; try updating transforms.conf with WRITE_META = false and restart indexer(s) for new changes to take effect and see if it works.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:22:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390700#M94143</guid>
      <dc:creator>Rob2520</dc:creator>
      <dc:date>2020-09-29T21:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why is source type override based on host not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390701#M94144</link>
      <description>&lt;P&gt;I changed the WRITE_META value to false and restarted but still no luck @Rob2520. I am able to see the new sourcetype values in interested fields but not able to search for them.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 08:31:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390701#M94144</guid>
      <dc:creator>siva_cg</dc:creator>
      <dc:date>2018-09-25T08:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why is source type override based on host not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390702#M94145</link>
      <description>&lt;P&gt;Hi @siva_cg,&lt;/P&gt;

&lt;P&gt;Your configuration is not correct to set sourcetype, look at answer given by me on this question &lt;A href="https://answers.splunk.com/answers/686241/metadata-transforms-not-being-applied-after-series-1.html#answer-687394"&gt;https://answers.splunk.com/answers/686241/metadata-transforms-not-being-applied-after-series-1.html#answer-687394&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Try to set transforms.conf like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[index1_host1]
REGEX = host1
SOURCE_KEY = MetaData:Host
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::sourcetype1

[index1_host2]
REGEX = host2
SOURCE_KEY = MetaData:Host
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::sourcetype2

[index1_host3]
REGEX = host3
SOURCE_KEY = MetaData:Host
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::sourcetype3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Sep 2018 11:40:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390702#M94145</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-09-26T11:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is source type override based on host not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390703#M94146</link>
      <description>&lt;P&gt;Thank you @harsmarvania57. It is working now.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 12:39:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390703#M94146</guid>
      <dc:creator>siva_cg</dc:creator>
      <dc:date>2018-09-26T12:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why is source type override based on host not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390704#M94147</link>
      <description>&lt;P&gt;Gorgeous - a bit counterintuitive &lt;CODE&gt;FORMAT = sourcetype::sourcetype1&lt;/CODE&gt; as &lt;CODE&gt;DEST_KEY&lt;/CODE&gt; already species the destination via &lt;CODE&gt;DEST_KEY = MetaData:Sourcetype&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 13:21:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-source-type-override-based-on-host-not-working/m-p/390704#M94147</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2018-09-26T13:21:58Z</dc:date>
    </item>
  </channel>
</rss>

