<?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: REX - extract second field between quotes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612220#M212859</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236514"&gt;@Mick_OBrien&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Sep 2022 09:04:32 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-09-07T09:04:32Z</dc:date>
    <item>
      <title>How to extract second field between quotes and add url?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612209#M212849</link>
      <description>&lt;P&gt;I have logs of the format...&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;2022-09-07T01:42:06.321624+00:00 &lt;STRONG&gt;micro.service&lt;/STRONG&gt; 2867ce23-bdfd-48eb-ba5a-40e1e8a93987[[APP/PROC/WEB/0]] 159.203.190.66, 100.64.144.3 - - - [07/Sep/2022:01:42:06 +0000] "GET &lt;STRONG&gt;url&lt;/STRONG&gt; HTTP/1.1" 404 125&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;...and I want to extract a count of missing URLs by microservice.&amp;nbsp; I can get a count of microservice using...&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;index=myIndex "404 125" | rex "^\S+\s(?&amp;lt;microService&amp;gt;\S+).*" | bucket _time span=day | stats count by microService&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;...but I would like to know how to add the url&lt;/P&gt;
&lt;P&gt;Any help appreciated&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 15:52:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612209#M212849</guid>
      <dc:creator>Mick_OBrien</dc:creator>
      <dc:date>2022-09-07T15:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: REX - extract second field between quotes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612215#M212854</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236514"&gt;@Mick_OBrien&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand: in your sample you want to extract: "micro.service" and "APP/PROC/WEB/0", is it correct?&lt;/P&gt;&lt;P&gt;If this is your need, please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "^\S+\s(?&amp;lt;microService&amp;gt;\S+).*.\[\[(?&amp;lt;url&amp;gt;[^\]]+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/HFgP6J/1" target="_blank"&gt;https://regex101.com/r/HFgP6J/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 08:25:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612215#M212854</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-07T08:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: REX - extract second field between quotes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612216#M212855</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;/P&gt;&lt;P&gt;Thanks for reply but&amp;nbsp;I want to extract the &lt;STRONG&gt;url&lt;/STRONG&gt;&amp;nbsp;after the GET&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mick&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 08:30:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612216#M212855</guid>
      <dc:creator>Mick_OBrien</dc:creator>
      <dc:date>2022-09-07T08:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: REX - extract second field between quotes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612217#M212856</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236514"&gt;@Mick_OBrien&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;ok, please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "^\S+\s(?&amp;lt;microService&amp;gt;\S+).*.\"GET\s+(?&amp;lt;url&amp;gt;[^ ]+)"&lt;/LI-CODE&gt;&lt;P&gt;that you&amp;nbsp; can test at&amp;nbsp;&lt;A href="https://regex101.com/r/HFgP6J/2" target="_blank"&gt;https://regex101.com/r/HFgP6J/2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 08:38:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612217#M212856</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-07T08:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: REX - extract second field between quotes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612218#M212857</link>
      <description>&lt;P&gt;&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;Thanks - that seems to be working!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 08:45:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612218#M212857</guid>
      <dc:creator>Mick_OBrien</dc:creator>
      <dc:date>2022-09-07T08:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: REX - extract second field between quotes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612220#M212859</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236514"&gt;@Mick_OBrien&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 09:04:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-second-field-between-quotes-and-add-url/m-p/612220#M212859</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-09-07T09:04:32Z</dc:date>
    </item>
  </channel>
</rss>

