<?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: Creating new field from raw event in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Creating-new-field-from-raw-event/m-p/711112#M21582</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261968"&gt;@RSS_STT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue here is the source_key which is incorrectly set, it should be set to _raw, although _raw is the default so you could just remove that line entirely.&lt;/P&gt;&lt;P&gt;You also do not need to specify the naming of the extraction in the REGEX and instead use $1, so your resulting transform will look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[severity]
REGEX = "level":\s\"(\w+)
FORMAT = severity::"$1"
WRITE_META = true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider upvoting/karma this answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
    <pubDate>Mon, 10 Feb 2025 10:16:40 GMT</pubDate>
    <dc:creator>livehybrid</dc:creator>
    <dc:date>2025-02-10T10:16:40Z</dc:date>
    <item>
      <title>Creating new field from raw event</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Creating-new-field-from-raw-event/m-p/711111#M21581</link>
      <description>&lt;P&gt;i want to create new index time field severity if raw json payload have level field value is Information.&lt;/P&gt;&lt;P&gt;{ "level": "Information", "ORIGIN_Severity_name": "CRITICAL", "ProductArea": "Application", "ORIGIN_Product": "Infrastructure"}&lt;/P&gt;&lt;P&gt;What's wrong in my transforms.conf configuration. Any help much appreciated.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;[severity]&lt;BR /&gt;REGEX = "level":\s\"(?&amp;lt;severity&amp;gt;\w+)&lt;BR /&gt;SOURCE_KEY = fields:level&lt;BR /&gt;FORMAT = severity::"INFO"&lt;BR /&gt;WRITE_META = true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 10:08:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Creating-new-field-from-raw-event/m-p/711111#M21581</guid>
      <dc:creator>RSS_STT</dc:creator>
      <dc:date>2025-02-10T10:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new field from raw event</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Creating-new-field-from-raw-event/m-p/711112#M21582</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261968"&gt;@RSS_STT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue here is the source_key which is incorrectly set, it should be set to _raw, although _raw is the default so you could just remove that line entirely.&lt;/P&gt;&lt;P&gt;You also do not need to specify the naming of the extraction in the REGEX and instead use $1, so your resulting transform will look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[severity]
REGEX = "level":\s\"(\w+)
FORMAT = severity::"$1"
WRITE_META = true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider upvoting/karma this answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 10:16:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Creating-new-field-from-raw-event/m-p/711112#M21582</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-02-10T10:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new field from raw event</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Creating-new-field-from-raw-event/m-p/711117#M21583</link>
      <description>&lt;P&gt;it helped but how can ensure that it's create severity = INFO field only when level=Information.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 10:28:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Creating-new-field-from-raw-event/m-p/711117#M21583</guid>
      <dc:creator>RSS_STT</dc:creator>
      <dc:date>2025-02-10T10:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new field from raw event</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Creating-new-field-from-raw-event/m-p/711133#M21584</link>
      <description>&lt;P&gt;Oh I see, sorry.&lt;/P&gt;&lt;P&gt;In that case you could do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[severity]
REGEX = "level":\s\"(Informational)
FORMAT = severity::INFO
WRITE_META = true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This means it will only set the severity field (to INFO) when level=Informational - Is this what you want, or should it be other values if not Informational?&lt;/P&gt;&lt;P&gt;Is there a particular reason you are looking to make this index-time instead of a search-time change?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 11:21:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Creating-new-field-from-raw-event/m-p/711133#M21584</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-02-10T11:21:36Z</dc:date>
    </item>
  </channel>
</rss>

