<?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: SOURCE_Key Extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/SOURCE-Key-Extraction/m-p/692095#M235600</link>
    <description>&lt;P&gt;I am trying to test the Index Time field extraction,&amp;nbsp;&lt;/P&gt;&lt;P&gt;and want to know how to refine the field extraction using source_key Keyword.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then how can i refine my Field extraction if i cant use the SOURCE_KEY twice?&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 13:23:00 GMT</pubDate>
    <dc:creator>AliMaher</dc:creator>
    <dc:date>2024-07-01T13:23:00Z</dc:date>
    <item>
      <title>SOURCE_Key Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SOURCE-Key-Extraction/m-p/692017#M235581</link>
      <description>&lt;P&gt;I Have used the below two events to test the &lt;U&gt;&lt;STRONG&gt;SOURCE_KEY =&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%"&gt;&amp;lt;132&amp;gt;1 2023-12-24T09:48:05+00:00 DCSECIDKOASV02 ikeyserver 8244 - [meta sequenceId="2850227"] {Warning}, {RADIUS}, {W-006001}, {An invalid RADIUS packet has been received.}, {0x0C744774DF59FC530462C92D2781B102}, {Source Location:10.240.86.6:1812 (Authentication)}, {Client Location:10.240.86.18:42923}, {Reason:The packet is smaller than minimum size allowed for RADIUS}, {Request ID:101}, {Input Details:0x64656661756C742073656E6420737472696E67}, {Request Type:Indeterminate}&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%"&gt;&amp;lt;132&amp;gt;1 2023-12-24T09:48:05+00:00 DCSECIDKOASV02 ikeyserver 8244 - [meta sequenceId="2850228"] {Warning}, {RADIUS}, {W-006001}, {An invalid RADIUS packet has been received.}, {0xBA42228CB3604ECFDEEBC274D3312187}, {Source Location:10.240.86.6:1812 (Authentication)}, {Client Location:10.240.86.19:18721}, {Reason:The packet is smaller than minimum size allowed for RADIUS}, {Request ID:101}, {Input Details:0x64656661756C742073656E6420737472696E67}, {Request Type:Indeterminate}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the below Regex:&lt;/P&gt;&lt;P&gt;[xmlExtractionIDX]&lt;BR /&gt;REGEX = .*?"]\s+\{(?&amp;lt;Severity&amp;gt;\w+)\},\s+\{\w+\},\s+\{(?&amp;lt;DeviceID&amp;gt;[^}]*)\},(.*)&lt;BR /&gt;FORMAT = Severity::$1 DeviceID::$2 Last_Part::$3&lt;/P&gt;&lt;P&gt;WRITE_META = true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;till that it's working fine then i want to add more precise extraction and want to extarct more info from the Last_Part field using the SOURCE_KEY =&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[xmlExtractionIDX]&lt;BR /&gt;REGEX = .*?"]\s+\{(?&amp;lt;Severity&amp;gt;\w+)\},\s+\{\w+\},\s+\{(?&amp;lt;DeviceID&amp;gt;[^}]*)\},(.*)&lt;BR /&gt;FORMAT = Severity::$1 DeviceID::$2 Last_Part::$3&lt;BR /&gt;SOURCE_KEY = MetaData:Last_Part&lt;BR /&gt;REGEX = Reason:(.*?)\}&lt;BR /&gt;FORMAT = Reason::$1&lt;BR /&gt;WRITE_META = true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it doesn't work now, Is there any advice to do that using SOURCE_KEY&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-center"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2024 17:23:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SOURCE-Key-Extraction/m-p/692017#M235581</guid>
      <dc:creator>AliMaher</dc:creator>
      <dc:date>2024-06-30T17:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: SOURCE_Key Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SOURCE-Key-Extraction/m-p/692022#M235582</link>
      <description>&lt;P&gt;Apart from the direct technical answer - you can't have two same settings (two FORMAT entries) in the same stanza. The latter overwrittes the former.&lt;/P&gt;&lt;P&gt;But there are more issues here - why are you trying to use index-time extractions in the first place?&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2024 18:12:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SOURCE-Key-Extraction/m-p/692022#M235582</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-06-30T18:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: SOURCE_Key Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SOURCE-Key-Extraction/m-p/692095#M235600</link>
      <description>&lt;P&gt;I am trying to test the Index Time field extraction,&amp;nbsp;&lt;/P&gt;&lt;P&gt;and want to know how to refine the field extraction using source_key Keyword.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then how can i refine my Field extraction if i cant use the SOURCE_KEY twice?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 13:23:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SOURCE-Key-Extraction/m-p/692095#M235600</guid>
      <dc:creator>AliMaher</dc:creator>
      <dc:date>2024-07-01T13:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: SOURCE_Key Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SOURCE-Key-Extraction/m-p/692105#M235603</link>
      <description>&lt;P&gt;OK. If it's just for testing the functionality, I won't be bugging you about it too much &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Just remember that apart from very specific cases index-time extractions are best avoided.&lt;/P&gt;&lt;P&gt;But back to the point - if you want to extract a field from a previously extracted field, you need to have two separate transforms and make sure they are triggered in a proper order.&lt;/P&gt;&lt;P&gt;So you need to first define a transform which extracts a field (or set of fields) from raw data. And then define another transform which extracts your field from an already extracted field. As a bonus you might (if you don't need it indexed) add yet another transform to "delete" (by setting it to null() using INGEST_EVAL) the field extracted in the first step.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;transforms.conf:&lt;/P&gt;&lt;PRE&gt;[test_extract_payload]&lt;BR /&gt;REGEX = payload:\s"([^"]+)"&lt;BR /&gt;FORMAT = payload::$1&lt;BR /&gt;WRITE_META = true&lt;BR /&gt;&lt;BR /&gt;[test_extract_site]&lt;BR /&gt;REGEX = site:\s(\S)+&lt;BR /&gt;FORMAT = site::$1&lt;BR /&gt;WRITE_META = true&lt;BR /&gt;SOURCE_KEY = payload&lt;/PRE&gt;&lt;P&gt;props.conf:&lt;/P&gt;&lt;PRE&gt;[my_sourcetype]&lt;BR /&gt;TRANSFORMS-extract-site-from-payload = test_extract_payload, test_extract_site&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This way you'll get your &lt;EM&gt;site&lt;/EM&gt; field extracted from an event containing&lt;/P&gt;&lt;PRE&gt;payload: "whatever whatever site: site1 whatever"&lt;/PRE&gt;&lt;P&gt;but not from just&lt;/P&gt;&lt;PRE&gt;"whatever whatever site: site1 whatever"&lt;/PRE&gt;&lt;P&gt;or&lt;/P&gt;&lt;PRE&gt;payload: "whatever whatever" site: site1&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Jul 2024 14:12:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SOURCE-Key-Extraction/m-p/692105#M235603</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-07-01T14:12:54Z</dc:date>
    </item>
  </channel>
</rss>

