<?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: Extract Http status from - event text -.. [2020-11-26T11:27:56.025047450Z] &amp;quot;PUT /sendmail HTTP/1.1&amp;quot; 400 20 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-Http-status-from-event-text-2020-11-26T11-27-56/m-p/531715#M150182</link>
    <description>&lt;P&gt;If removing &lt;FONT face="courier new,courier"&gt;\"&lt;/FONT&gt; gives you undesired results then why remove it? It's not clear what problem you are trying to solve.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Dec 2020 14:46:23 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-12-02T14:46:23Z</dc:date>
    <item>
      <title>Extract Http status from - event text -.. [2020-11-26T11:27:56.025047450Z] "PUT /sendmail HTTP/1.1" 400 203 252 "-"...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Http-status-from-event-text-2020-11-26T11-27-56/m-p/531686#M150173</link>
      <description>&lt;P&gt;i am trying to extract http status from below event row text using search , but could not able to get status,&lt;/P&gt;&lt;P&gt;event content -&amp;nbsp;&lt;/P&gt;&lt;P&gt;.. [2020-11-26T11:27:56.025047450Z] "PUT /sendmail HTTP/1.1" 400 203 252 "-" ...&lt;/P&gt;&lt;P&gt;search :&lt;/P&gt;&lt;P&gt;| rex field=_raw "(?&amp;lt;prevFields&amp;gt;.*)\"PUT /sendmail HTTP/\d+\.\d+&lt;STRONG&gt;\"&lt;/STRONG&gt;&amp;nbsp; (?&amp;lt;statusFieldStart&amp;gt;.*)"&lt;BR /&gt;| table prevFields statusFieldStart&lt;/P&gt;&lt;P&gt;if i remove&amp;nbsp; \" , that is highlighted one , then i am getting&amp;nbsp;statusFieldStart with content " 400 203 252 "-" ,that having double quote at start , want to remove it so i can extract status field complete. anything am i missing here&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 13:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Http-status-from-event-text-2020-11-26T11-27-56/m-p/531686#M150173</guid>
      <dc:creator>Jagdish</dc:creator>
      <dc:date>2020-12-02T13:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Http status from - event text -.. [2020-11-26T11:27:56.025047450Z] "PUT /sendmail HTTP/1.1" 400 20</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Http-status-from-event-text-2020-11-26T11-27-56/m-p/531706#M150180</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229353"&gt;@Jagdish&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if you want to extract only "400", you have to use the following regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search
| rex field=_raw "(?&amp;lt;prevFields&amp;gt;.*)\"PUT\s+\/sendmail\s+HTTP\/\d+\.\d+\"\s+(?&amp;lt;statusFieldStart&amp;gt;\d+)"
| table prevFields statusFieldStart&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/ib3ABr/1" target="_blank"&gt;https://regex101.com/r/ib3ABr/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If instead you want to extract "&lt;SPAN&gt;400 203 252", you could use this regex:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search
| rex field=_raw "(?&amp;lt;prevFields&amp;gt;.*)\"PUT\s+\/sendmail\s+HTTP\/\d+\.\d+\"\s+(?&amp;lt;statusFieldStart&amp;gt;\d+\s+\d+\s+\d+)"
| table prevFields statusFieldStart&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/ib3ABr/2" target="_blank"&gt;https://regex101.com/r/ib3ABr/2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 14:03:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Http-status-from-event-text-2020-11-26T11-27-56/m-p/531706#M150180</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-12-02T14:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Http status from - event text -.. [2020-11-26T11:27:56.025047450Z] "PUT /sendmail HTTP/1.1" 400 20</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Http-status-from-event-text-2020-11-26T11-27-56/m-p/531715#M150182</link>
      <description>&lt;P&gt;If removing &lt;FONT face="courier new,courier"&gt;\"&lt;/FONT&gt; gives you undesired results then why remove it? It's not clear what problem you are trying to solve.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 14:46:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Http-status-from-event-text-2020-11-26T11-27-56/m-p/531715#M150182</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-02T14:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Http status from - event text -.. [2020-11-26T11:27:56.025047450Z] "PUT /sendmail HTTP/1.1" 400 20</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Http-status-from-event-text-2020-11-26T11-27-56/m-p/531846#M150232</link>
      <description>&lt;P&gt;Thanks , but its not working it does not showing either of field value.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 11:15:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Http-status-from-event-text-2020-11-26T11-27-56/m-p/531846#M150232</guid>
      <dc:creator>Jagdish</dc:creator>
      <dc:date>2020-12-03T11:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Http status from - event text -.. [2020-11-26T11:27:56.025047450Z] "PUT /sendmail HTTP/1.1" 400 20</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Http-status-from-event-text-2020-11-26T11-27-56/m-p/531853#M150237</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229353"&gt;@Jagdish&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the regex I hinted extracts the values from the sample you shared (see in regex101).&lt;/P&gt;&lt;P&gt;If it doesn't run on your data, please share more complete samples to check the regex.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 12:35:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Http-status-from-event-text-2020-11-26T11-27-56/m-p/531853#M150237</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-12-03T12:35:59Z</dc:date>
    </item>
  </channel>
</rss>

