<?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: Field extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623128#M216626</link>
    <description>&lt;P&gt;Hi My usecase is field extraction not the search pls help in extracting the fields from the events i mentioned above.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 04 Dec 2022 11:41:31 GMT</pubDate>
    <dc:creator>balu1211</dc:creator>
    <dc:date>2022-12-04T11:41:31Z</dc:date>
    <item>
      <title>How to extract this field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623109#M216618</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;extract the field&lt;/P&gt;
&lt;P&gt;sample data : "tag":AKAMAI/WAF/&lt;/P&gt;
&lt;P&gt;Thanks..&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 17:10:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623109#M216618</guid>
      <dc:creator>balu1211</dc:creator>
      <dc:date>2022-12-06T17:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623110#M216619</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250934"&gt;@balu1211&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "(?ms)\"tag\":\s*(?&amp;lt;tag&amp;gt;[^\n]+)"&lt;/LI-CODE&gt;&lt;P&gt;that you an test at &lt;A href="https://regex101.com/r/3p4M9q/1" target="_blank"&gt;https://regex101.com/r/3p4M9q/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 17:08:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623110#M216619</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-03T17:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623120#M216622</link>
      <description>&lt;P&gt;...&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 10:52:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623120#M216622</guid>
      <dc:creator>balu1211</dc:creator>
      <dc:date>2022-12-05T10:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623121#M216623</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250934"&gt;@balu1211&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I thought that the one you shared was your event!&lt;/P&gt;&lt;P&gt;could you share (in text format not screenshot) the event for field extraction?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 06:30:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623121#M216623</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-04T06:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623125#M216624</link>
      <description>&lt;P&gt;.............&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 10:48:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623125#M216624</guid>
      <dc:creator>balu1211</dc:creator>
      <dc:date>2022-12-05T10:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623127#M216625</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath attackData.rules{}.tag output=tag
| mvexpand tag
| rex field=tag "(?&amp;lt;name&amp;gt;.*)/.*?"
| eval name=coalesce(name,tag)
| eval {name}=tag&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 04 Dec 2022 11:07:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623127#M216625</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-12-04T11:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623128#M216626</link>
      <description>&lt;P&gt;Hi My usecase is field extraction not the search pls help in extracting the fields from the events i mentioned above.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 11:41:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623128#M216626</guid>
      <dc:creator>balu1211</dc:creator>
      <dc:date>2022-12-04T11:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623129#M216627</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250934"&gt;@balu1211&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;this is a regex to extract the tag vales:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\"tag\":\"(?&amp;lt;tag&amp;gt;[^\"]*)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/mGxdvh/1" target="_blank" rel="noopener"&gt;https://regex101.com/r/mGxdvh/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Anyway, as hinted by &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;, I hint to explore the spath command (&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Spath" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Spath&lt;/A&gt;) to extract all the fields from your json file.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 14:07:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623129#M216627</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-04T14:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623130#M216628</link>
      <description>&lt;P&gt;What have you already tried?&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 14:13:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623130#M216628</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-12-04T14:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623133#M216630</link>
      <description>&lt;P&gt;....&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 10:53:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623133#M216630</guid>
      <dc:creator>balu1211</dc:creator>
      <dc:date>2022-12-05T10:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623136#M216631</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250934"&gt;@balu1211&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the regex I shared correctly extract the tag field also with this source, what's the problem?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 17:15:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623136#M216631</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-04T17:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623141#M216635</link>
      <description>&lt;P&gt;&lt;A href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250934" target="_blank"&gt;@balu1211&lt;/A&gt;I am glad you finally started to explain what you are trying to do in the other thread &lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-extract-the-field-quot-alert-quot-with-the-field-name/m-p/623066#M216611" target="_blank" rel="noopener"&gt;Re: Help with the field extraction and regex&lt;/A&gt;. So, based on this, you have a conformant JSON, therefore you must already have a field named tag that is extracted already. Applying the same technique from the other thread,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=tag mode=sed "s/AKAMAI\/(\w+)\/(.+)/AKAMAI_\1=\"\2\"/"
| rex field=tag mode=sed "s/ASE\/(\w+)\/(.+)/ASE\/\1=\"\2\"/"
| rex field=tag mode=sed "s/(IPBLOCK\/.+)/ip_Attack=\"\1\"/"
| rex field=tag mode=sed "s/(CUSTOM_AKA\/.+)/Custom_Rules=\"\1\"/"
``` convert structured paths to key-value pairs ```
| rename _raw as temp, tag as _raw ``` extract works on _raw only ```
| kv ``` extract key-value pairs ```
| rename temp as _raw&lt;/LI-CODE&gt;&lt;P&gt;This is the same formula I posted there, except it was never clear that you had a field named "tag" and that the data was somehow related to your initial question.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 20:10:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623141#M216635</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-12-04T20:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623438#M216723</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Could you help me out to extract these field to make it as a global.&lt;/P&gt;&lt;P&gt;"tag":"&lt;FONT face="arial,helvetica,sans-serif" color="#FF0000"&gt;IPBLOCK&lt;/FONT&gt;"&lt;BR /&gt;"tag":"IPBLOCK/ADAPTIVE/&lt;FONT color="#FF0000"&gt;BURST&lt;/FONT&gt;"&lt;BR /&gt;"tag":"IPBLOCK/ADAPTIVE/&lt;FONT color="#FF0000"&gt;SUMMARY&lt;/FONT&gt;"&lt;/P&gt;&lt;P&gt;I want to extract these marked in red color in one new field name as&amp;nbsp; ip_block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 14:53:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623438#M216723</guid>
      <dc:creator>balu1211</dc:creator>
      <dc:date>2022-12-06T14:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623442#M216727</link>
      <description>&lt;P&gt;What have you tried so far?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 14:59:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623442#M216727</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-12-06T14:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623447#M216729</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250934"&gt;@balu1211&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\"tag\":\"(\w*\/\w*\/)*(?&amp;lt;tag&amp;gt;[^\"]+)"&lt;/LI-CODE&gt;&lt;P&gt;but it's always better to create a new question for a new issue.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 15:19:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623447#M216729</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-06T15:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623459#M216733</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my usecase is like the values under ipblock/adaptive should extract under new filed name including&amp;nbsp; ipblock value as well in that new field name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;"tag":"&lt;/SPAN&gt;&lt;FONT face="arial,helvetica,sans-serif" color="#FF0000"&gt;IPBLOCK&lt;/FONT&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"tag":"IPBLOCK/ADAPTIVE/&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;BURST&lt;/FONT&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"tag":"IPBLOCK/ADAPTIVE/&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;SUMMARY&lt;/FONT&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Output: under new field name eg. ip_attack&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IPBLOCK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BURST&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SUMMARY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 16:19:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623459#M216733</guid>
      <dc:creator>balu1211</dc:creator>
      <dc:date>2022-12-06T16:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623465#M216735</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250934"&gt;@balu1211&lt;/a&gt;,please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\"tag\":\"(\w*\/\w*\/)*(?&amp;lt;ip_attack&amp;gt;\w+)\""&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/dEkQF3/1" target="_blank"&gt;https://regex101.com/r/dEkQF3/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 16:58:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623465#M216735</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-06T16:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623472#M216739</link>
      <description>&lt;P&gt;...&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 17:23:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623472#M216739</guid>
      <dc:creator>balu1211</dc:creator>
      <dc:date>2022-12-08T17:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623519#M216751</link>
      <description>&lt;P&gt;You can use mvindex to extract the last part of a path.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval tag = mvindex(split(tag, "/"), -1)&lt;/LI-CODE&gt;&lt;P&gt;As &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;, you should start a new post when you change substance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 05:26:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-this-field/m-p/623519#M216751</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-12-07T05:26:35Z</dc:date>
    </item>
  </channel>
</rss>

