<?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 change sourcetype for sourcetype not starting with specific word in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/change-sourcetype-for-sourcetype-not-starting-with-specific-word/m-p/465331#M191674</link>
    <description>&lt;P&gt;I want to change the sourcetype for all incoming logs with sourcetypes not starting with abc. I have following setting but it would change it for all the sourcetypes&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  #Transforms.conf on indexer

  [noncerner:setnull]
  SOURCE_KEY = MetaData:Sourcetype
  REGEX = (?::){0}^(?!ABC).*
  #REGEX = ^(?!ABC).* tried it
  #REGEX = sourcetype::^(?!ABC).* tried it
  #REGEX = sourcetype::(?::)^(?!ABC).* tried it
  DEST_KEY = MetaData:Sourcetype
  FORMAT = sourcetype::ABC:temp:logs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any hep is appreciated.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2019 19:02:26 GMT</pubDate>
    <dc:creator>ss026381</dc:creator>
    <dc:date>2019-10-23T19:02:26Z</dc:date>
    <item>
      <title>change sourcetype for sourcetype not starting with specific word</title>
      <link>https://community.splunk.com/t5/Splunk-Search/change-sourcetype-for-sourcetype-not-starting-with-specific-word/m-p/465331#M191674</link>
      <description>&lt;P&gt;I want to change the sourcetype for all incoming logs with sourcetypes not starting with abc. I have following setting but it would change it for all the sourcetypes&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  #Transforms.conf on indexer

  [noncerner:setnull]
  SOURCE_KEY = MetaData:Sourcetype
  REGEX = (?::){0}^(?!ABC).*
  #REGEX = ^(?!ABC).* tried it
  #REGEX = sourcetype::^(?!ABC).* tried it
  #REGEX = sourcetype::(?::)^(?!ABC).* tried it
  DEST_KEY = MetaData:Sourcetype
  FORMAT = sourcetype::ABC:temp:logs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any hep is appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 19:02:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/change-sourcetype-for-sourcetype-not-starting-with-specific-word/m-p/465331#M191674</guid>
      <dc:creator>ss026381</dc:creator>
      <dc:date>2019-10-23T19:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: change sourcetype for sourcetype not starting with specific word</title>
      <link>https://community.splunk.com/t5/Splunk-Search/change-sourcetype-for-sourcetype-not-starting-with-specific-word/m-p/465332#M191675</link>
      <description>&lt;P&gt;&lt;CODE&gt;^((?!abc).)*&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This regex shall negate the string exists. &lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 21:26:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/change-sourcetype-for-sourcetype-not-starting-with-specific-word/m-p/465332#M191675</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2019-10-23T21:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: change sourcetype for sourcetype not starting with specific word</title>
      <link>https://community.splunk.com/t5/Splunk-Search/change-sourcetype-for-sourcetype-not-starting-with-specific-word/m-p/465333#M191676</link>
      <description>&lt;P&gt;there is no problem with the regex. it works when I put it in regex101. I think the problem is that we cannot use regex with sourcetype.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 13:22:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/change-sourcetype-for-sourcetype-not-starting-with-specific-word/m-p/465333#M191676</guid>
      <dc:creator>ss026381</dc:creator>
      <dc:date>2019-10-24T13:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: change sourcetype for sourcetype not starting with specific word</title>
      <link>https://community.splunk.com/t5/Splunk-Search/change-sourcetype-for-sourcetype-not-starting-with-specific-word/m-p/465334#M191677</link>
      <description>&lt;P&gt;This is the syntax for what you want to do. Let me know&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[noncerner:setnull]
FORMAT = sourcetype::ABC:temp:logs
DEST_KEY = MetaData:Sourcetype
SOURCE_KEY = MetaData:Sourcetype
REGEX = sourcetype::(((?!abc)).*)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Oct 2019 14:44:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/change-sourcetype-for-sourcetype-not-starting-with-specific-word/m-p/465334#M191677</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2019-10-24T14:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: change sourcetype for sourcetype not starting with specific word</title>
      <link>https://community.splunk.com/t5/Splunk-Search/change-sourcetype-for-sourcetype-not-starting-with-specific-word/m-p/465335#M191678</link>
      <description>&lt;P&gt;Very big thumps up, it worked, thanks. I am testing few more scenarios and will comment later today.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 15:59:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/change-sourcetype-for-sourcetype-not-starting-with-specific-word/m-p/465335#M191678</guid>
      <dc:creator>ss026381</dc:creator>
      <dc:date>2019-10-24T15:59:54Z</dc:date>
    </item>
  </channel>
</rss>

