<?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 Extract raw data for URL into field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-raw-data-for-URL-into-field/m-p/581974#M202724</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In the following log, I wanted to extract&amp;nbsp;Url, Method, ResponseTimeMs, StatusCode as a table:&lt;/P&gt;&lt;P&gt;log:&amp;nbsp;a_level="INFO", a_time="null", a_sub="xxx", a_uid="xx", a_tid="xx", a_rid="guid", a_thread="175" a_type="type", a_met="Move", a_msg="Method=GET,Uri=&lt;A href="http://monolith-xxx.abc.com/v2/clients?skip=0top=100,MediaType=null,RemoteIP=::ffff:10.10.10.10,XRemoteIP=null,ContentType=application/json,ContentLength=9702,ResponseTimeMs=54,StatusCode=200,ReasonPhrase=null,Referrer=null" target="_blank" rel="noopener"&gt;http://monolith-xxx.abc.com/v2/clients?skip=0top=100,MediaType=null,RemoteIP=::ffff:10.10.10.10,XRemoteIP=null,ContentType=application/json,ContentLength=9702,ResponseTimeMs=54,StatusCode=200,ReasonPhrase=null,Referrer=null&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For URL, I wanted the full extract "&lt;A href="http://monolith-xxx.abc-xyz/v2/clients?skip=0top=100" target="_blank" rel="noopener"&gt;http://monolith-xxx.abc-xyz/v2/clients?skip=0top=100&lt;/A&gt;"&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current splunk query is as below:&lt;/P&gt;&lt;P&gt;index=aws_abc env=prd-01 uri Method StatusCode&amp;nbsp;ResponseTimeMs&lt;BR /&gt;| eval DataSet=log&lt;BR /&gt;| rex field=DataSet "ResponseTimeMs=(?&amp;lt;ResponseTimeMs&amp;gt;\d+),StatusCode=(?&amp;lt;StatusCode&amp;gt;\d+)"&lt;BR /&gt;| rex field=DataSet "Url=(?&amp;lt;uri&amp;gt;[^,]+),Method=(?&amp;lt;Method&amp;gt;\w+)"&lt;BR /&gt;| table Url,Method,ResponseTimeMs, StatusCode&lt;/P&gt;&lt;P&gt;I get value in the table for ResponseTimeMs, StatusCode but not for URL and Method. Please help. Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 08:58:17 GMT</pubDate>
    <dc:creator>nbhat</dc:creator>
    <dc:date>2022-01-21T08:58:17Z</dc:date>
    <item>
      <title>Extract raw data for URL into field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-raw-data-for-URL-into-field/m-p/581974#M202724</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In the following log, I wanted to extract&amp;nbsp;Url, Method, ResponseTimeMs, StatusCode as a table:&lt;/P&gt;&lt;P&gt;log:&amp;nbsp;a_level="INFO", a_time="null", a_sub="xxx", a_uid="xx", a_tid="xx", a_rid="guid", a_thread="175" a_type="type", a_met="Move", a_msg="Method=GET,Uri=&lt;A href="http://monolith-xxx.abc.com/v2/clients?skip=0top=100,MediaType=null,RemoteIP=::ffff:10.10.10.10,XRemoteIP=null,ContentType=application/json,ContentLength=9702,ResponseTimeMs=54,StatusCode=200,ReasonPhrase=null,Referrer=null" target="_blank" rel="noopener"&gt;http://monolith-xxx.abc.com/v2/clients?skip=0top=100,MediaType=null,RemoteIP=::ffff:10.10.10.10,XRemoteIP=null,ContentType=application/json,ContentLength=9702,ResponseTimeMs=54,StatusCode=200,ReasonPhrase=null,Referrer=null&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For URL, I wanted the full extract "&lt;A href="http://monolith-xxx.abc-xyz/v2/clients?skip=0top=100" target="_blank" rel="noopener"&gt;http://monolith-xxx.abc-xyz/v2/clients?skip=0top=100&lt;/A&gt;"&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current splunk query is as below:&lt;/P&gt;&lt;P&gt;index=aws_abc env=prd-01 uri Method StatusCode&amp;nbsp;ResponseTimeMs&lt;BR /&gt;| eval DataSet=log&lt;BR /&gt;| rex field=DataSet "ResponseTimeMs=(?&amp;lt;ResponseTimeMs&amp;gt;\d+),StatusCode=(?&amp;lt;StatusCode&amp;gt;\d+)"&lt;BR /&gt;| rex field=DataSet "Url=(?&amp;lt;uri&amp;gt;[^,]+),Method=(?&amp;lt;Method&amp;gt;\w+)"&lt;BR /&gt;| table Url,Method,ResponseTimeMs, StatusCode&lt;/P&gt;&lt;P&gt;I get value in the table for ResponseTimeMs, StatusCode but not for URL and Method. Please help. Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 08:58:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-raw-data-for-URL-into-field/m-p/581974#M202724</guid>
      <dc:creator>nbhat</dc:creator>
      <dc:date>2022-01-21T08:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extract raw data for URL into field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-raw-data-for-URL-into-field/m-p/581975#M202725</link>
      <description>&lt;P&gt;Not sure if there's typos in the example you've provided, the string after "a_msg" seems inconsistent with previous format.&lt;/P&gt;&lt;P&gt;Anyways, this was written have some flexibilty&amp;nbsp; in accomodating possible typos your event example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=DataSet "\"?Method\"?\=(?&amp;lt;Method&amp;gt;[^,]*)\,Uri=(?&amp;lt;uri&amp;gt;[^\,]+)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 09:31:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-raw-data-for-URL-into-field/m-p/581975#M202725</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-01-21T09:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Extract raw data for URL into field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-raw-data-for-URL-into-field/m-p/582000#M202733</link>
      <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 13:47:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-raw-data-for-URL-into-field/m-p/582000#M202733</guid>
      <dc:creator>nbhat</dc:creator>
      <dc:date>2022-01-21T13:47:33Z</dc:date>
    </item>
  </channel>
</rss>

