<?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: How do extract fields beginning from the end of a line. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94768#M24495</link>
    <description>&lt;P&gt;You might want to accept the answer, if it was helpful &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Nov 2010 22:16:56 GMT</pubDate>
    <dc:creator>ziegfried</dc:creator>
    <dc:date>2010-11-26T22:16:56Z</dc:date>
    <item>
      <title>How do extract fields beginning from the end of a line.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94763#M24490</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a simple request &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; For a certain syslog source, I need to extract the 3rd word beginning from the end of a line. That's all. In a regular regex, the following works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(\S*)[ ]\S*[ ]\S*$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And this matches correctly the SEVERE_ERROR and NORMAL_EVENT on the following lines: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Nov 25 13:55:04 x.x.x.x Nov 25 13:55:01 ProxySG: 310000 CFSSL:SSL_accept error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca(0) SEVERE_ERROR ../cf_ssl.cpp 1573
Nov 25 13:47:49 x.x.x.x Nov 25 13:47:47 ProxySG: 90000 NTP: Periodic query of server x.x.x.x, time within acceptable variance, 0 seconds, 8 ms fast compared to NTP time.(0) NORMAL_EVENT ../ntp.cpp 683
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, how do I translate this into Splunk?  When I try the Interactive Field Extractor, it always wants to start from the beginning of a line and I can't seem to get the correct Splunked regex for this field &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Any help is greatly appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2010 22:59:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94763#M24490</guid>
      <dc:creator>laurensv</dc:creator>
      <dc:date>2010-11-25T22:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do extract fields beginning from the end of a line.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94764#M24491</link>
      <description>&lt;P&gt;You can add the regex-extraction to the props.conf file. Eg. &lt;CODE&gt;$SPLUNK_HOME/etc/system/local/props.conf&lt;/CODE&gt; or in the app you want that extraction &lt;CODE&gt;$SPLUNK_HOME/etc/apps/&amp;lt;app&amp;gt;/local/props.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
EXTRACT-some-fields = ProxySG.+\s+(?&amp;lt;severity&amp;gt;\w+) (?&amp;lt;source_file&amp;gt;\S+) (?&amp;lt;line_no&amp;gt;\d+)$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;severity, source_file and line_no are the example field names. Splunk uses PCRE named groups to define the fieldname for extractions.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2010 00:43:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94764#M24491</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-11-26T00:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do extract fields beginning from the end of a line.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94765#M24492</link>
      <description>&lt;P&gt;I appreciate your help very much ;), but this does not seem to work...&lt;BR /&gt;
While source_file and line_no are correctly extracted, I get "T" &amp;amp; "R" as severity in my log files. These correspond to the last letter of NORMAL_EVENT and SEVERE_ERROR respectively...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:21:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94765#M24492</guid>
      <dc:creator>laurensv</dc:creator>
      <dc:date>2020-09-28T09:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do extract fields beginning from the end of a line.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94766#M24493</link>
      <description>&lt;P&gt;I've modified the regex. This one should work.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2010 20:07:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94766#M24493</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-11-26T20:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do extract fields beginning from the end of a line.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94767#M24494</link>
      <description>&lt;P&gt;Thank You! That did the trick &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2010 21:51:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94767#M24494</guid>
      <dc:creator>laurensv</dc:creator>
      <dc:date>2010-11-26T21:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do extract fields beginning from the end of a line.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94768#M24495</link>
      <description>&lt;P&gt;You might want to accept the answer, if it was helpful &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2010 22:16:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94768#M24495</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-11-26T22:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do extract fields beginning from the end of a line.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94769#M24496</link>
      <description>&lt;P&gt;Done &amp;amp; thanks again &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2010 22:37:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-extract-fields-beginning-from-the-end-of-a-line/m-p/94769#M24496</guid>
      <dc:creator>laurensv</dc:creator>
      <dc:date>2010-11-26T22:37:07Z</dc:date>
    </item>
  </channel>
</rss>

