<?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 Help with field extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-field-extraction/m-p/486080#M135991</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;[Response:"AccessToken":"XXXXX", "AuthenticationLevel":"2","AuthProviderInfo":"

[Response:"AccessToken":"XXXXX", "AuthenticationLevel":"1","AuthProviderInfo":"

"Response":{"ClientMessage":"Incorrect login.","Code":3011648,"Detail":"Incorrect login."},"Errors":[{"ClientMessage":"Incorrect login.","Code":3011648,"DefaultMessage":"Incorrect login.","StackTrace":null}]

from the above event i want to extract AuthenticationLevel":"2" as Count of MFA fails and  AuthenticationLevel":"1" as Count of successful logins and Code":3011648 as Incorrect login code
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can someone help me with writing regex to extract these fields?&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2019 19:11:48 GMT</pubDate>
    <dc:creator>vikram1583</dc:creator>
    <dc:date>2019-09-25T19:11:48Z</dc:date>
    <item>
      <title>Help with field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-field-extraction/m-p/486080#M135991</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;[Response:"AccessToken":"XXXXX", "AuthenticationLevel":"2","AuthProviderInfo":"

[Response:"AccessToken":"XXXXX", "AuthenticationLevel":"1","AuthProviderInfo":"

"Response":{"ClientMessage":"Incorrect login.","Code":3011648,"Detail":"Incorrect login."},"Errors":[{"ClientMessage":"Incorrect login.","Code":3011648,"DefaultMessage":"Incorrect login.","StackTrace":null}]

from the above event i want to extract AuthenticationLevel":"2" as Count of MFA fails and  AuthenticationLevel":"1" as Count of successful logins and Code":3011648 as Incorrect login code
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can someone help me with writing regex to extract these fields?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 19:11:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-field-extraction/m-p/486080#M135991</guid>
      <dc:creator>vikram1583</dc:creator>
      <dc:date>2019-09-25T19:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help with field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-field-extraction/m-p/486081#M135992</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_index&amp;gt;
| rex field=_raw "AuthenticationLevel\":\"(?&amp;lt;AuthenticationLevel&amp;gt;\d+)" 
| rex field=_raw "Code\":(?&amp;lt;Code&amp;gt;[^\,]+)" 
| stats count(eval(AuthenticationLevel="2")) as "count of MFA fails" count(eval(AuthenticationLevel="1")) as "Successfil logins" count(eval(Code="3011648")) as "Incorrect login code"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Sep 2019 20:38:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-field-extraction/m-p/486081#M135992</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-09-25T20:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help with field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-field-extraction/m-p/486082#M135993</link>
      <description>&lt;P&gt;Perfect Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 20:43:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-field-extraction/m-p/486082#M135993</guid>
      <dc:creator>vikram1583</dc:creator>
      <dc:date>2019-09-25T20:43:51Z</dc:date>
    </item>
  </channel>
</rss>

