<?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 to extract a field from a Juniper log? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339702#M100759</link>
    <description>&lt;P&gt;Wonderful! Works like a charm when I use it in the search query.&lt;BR /&gt;
That is what I missed when I kept using it in the field extraction.&lt;BR /&gt;
But this should work fine for me.&lt;BR /&gt;
Thanks for the help&lt;/P&gt;</description>
    <pubDate>Mon, 12 Mar 2018 18:49:11 GMT</pubDate>
    <dc:creator>bbsplunklog</dc:creator>
    <dc:date>2018-03-12T18:49:11Z</dc:date>
    <item>
      <title>How to extract a field from a Juniper log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339696#M100753</link>
      <description>&lt;P&gt;I'm trying to extract a field from a Juniper log. An event would end with something like this:&lt;BR /&gt;
reason=Close - RESP\x00&lt;BR /&gt;
reason=Close - AGE OUT\x00&lt;BR /&gt;
reason=Close - TCP FIN\x00&lt;BR /&gt;
reason=Close - TCP RST\x00&lt;/P&gt;

&lt;P&gt;I wanted to extract this using this regex (reason=.*) which works fine on &lt;A href="https://regexr.com/"&gt;https://regexr.com/&lt;/A&gt;&lt;BR /&gt;
However on Splunk it will only captuture "reason=Close".&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 16:08:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339696#M100753</guid>
      <dc:creator>bbsplunklog</dc:creator>
      <dc:date>2018-03-12T16:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from a Juniper log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339697#M100754</link>
      <description>&lt;P&gt;rex field=_raw "reason=(?.*)" &lt;/P&gt;

&lt;P&gt;Assuming the lines are from your raw events or just replace raw by the specific field name which contains reason events&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 17:46:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339697#M100754</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-03-12T17:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from a Juniper log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339698#M100755</link>
      <description>&lt;P&gt;Same. It only captures "reason-Close" and not the rest of the phrase.&lt;BR /&gt;
Here's a sample log which might help:&lt;BR /&gt;
2018-03-12 09:35:07 Local0.Notice   10.1.67.249 SSG350M: NetScreen device_id=JN1234567ADE  [Root]system-notification-00257(traffic): start_time="2018-03-12 09:35:05" duration=2 policy_id=2 service=https proto=6 src zone=Trust dst zone=Untrust action=Permit sent=2554 rcvd=19651 src=10.4.64.146 dst=2.2.2.2 src_port=56573 dst_port=443 src-xlated ip=1.1.1.1 port=18924 dst-xlated ip=3.3.3.3 port=443 session_id=119237 reason=Close - TCP RST\x00&lt;BR /&gt;
2018-03-12 09:35:07 Local0.Notice   10.1.67.249 SSG350M: NetScreen device_id=JN1234567ADE  [Root]system-notification-00257(traffic): start_time="2018-03-12 09:35:06" duration=1 policy_id=8 service=https proto=6 src zone=Trust dst zone=Untrust action=Permit sent=1847 rcvd=5637 src=10.6.64.106 dst=4.4.4.4 src_port=49751 dst_port=443 src-xlated ip=1.1.1.1 port=4501 dst-xlated ip=4.4.4.4 port=443 session_id=120720 reason=Close - TCP FIN\x00&lt;BR /&gt;
2018-03-12 09:35:07 Local0.Notice   10.1.67.249 SSG350M: NetScreen device_id=JN1234567ADE  [Root]system-notification-00257(traffic): start_time="2018-03-12 09:34:07" duration=60 policy_id=6 service=dns proto=17 src zone=Trust dst zone=Untrust action=Permit sent=132 rcvd=0 src=10.12.64.2 dst=6.6.6.6 src_port=57077 dst_port=53 src-xlated ip=3.3.3.3 port=25460 dst-xlated ip=5.5.5.5 port=53 session_id=122451 reason=Close - AGE OUT\x00&lt;BR /&gt;
2018-03-12 09:35:07 Local0.Notice   10.1.67.249 SSG350M: NetScreen device_id=JN1234567ADE  [Root]system-notification-00257(traffic): start_time="2018-03-12 09:35:05" duration=2 policy_id=6 service=dns proto=17 src zone=Trust dst zone=Untrust action=Permit sent=85 rcvd=117 src=10.12.64.71 dst=5.5.5.5 src_port=55968 dst_port=53 src-xlated ip=3.3.3.3 port=55968 dst-xlated ip=2.2.2.2 port=53 session_id=119234 reason=Close - RESP\x00&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:22:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339698#M100755</guid>
      <dc:creator>bbsplunklog</dc:creator>
      <dc:date>2020-09-29T18:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from a Juniper log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339699#M100756</link>
      <description>&lt;P&gt;what is the rex you are using in spunk right now to capture this?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 18:19:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339699#M100756</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-03-12T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from a Juniper log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339700#M100757</link>
      <description>&lt;P&gt;when i do  this -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=_raw "reason=(?&amp;lt;reason&amp;gt;.*)" | table reason
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get reason as &lt;/P&gt;

&lt;P&gt;reason&lt;BR /&gt;
Close - RESP\x00&lt;BR /&gt;&lt;BR /&gt;
Close - AGE OUT\x00&lt;BR /&gt;&lt;BR /&gt;
Close - TCP FIN\x00&lt;BR /&gt;&lt;BR /&gt;
Close - TCP RST\x00  &lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 18:36:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339700#M100757</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-03-12T18:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from a Juniper log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339701#M100758</link>
      <description>&lt;P&gt;i uploaded your sample in a notepad and run the above... only doubt  is what is your  source?&lt;BR /&gt;
spaces / multi spaces after CLOSE  can cause this extraction to fail...can you please confirm?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 18:38:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339701#M100758</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-03-12T18:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a field from a Juniper log?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339702#M100759</link>
      <description>&lt;P&gt;Wonderful! Works like a charm when I use it in the search query.&lt;BR /&gt;
That is what I missed when I kept using it in the field extraction.&lt;BR /&gt;
But this should work fine for me.&lt;BR /&gt;
Thanks for the help&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 18:49:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-field-from-a-Juniper-log/m-p/339702#M100759</guid>
      <dc:creator>bbsplunklog</dc:creator>
      <dc:date>2018-03-12T18:49:11Z</dc:date>
    </item>
  </channel>
</rss>

