<?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: Blue Coat Proxy Logs - User Agent Field Extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227349#M188334</link>
    <description>&lt;P&gt;Can you paste one of the events that are being mis... mis... what's the word?  Misinterpreted?  Misregexed?  Misparsed?  Well, no matter on the term.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Where in the event is "10.106.4.11"?  You could just be missing one extraction or something.&lt;/P&gt;

&lt;P&gt;FYI, optional characters or groups can be done like &lt;CODE&gt;ab?c&lt;/CODE&gt;, which would match &lt;CODE&gt;abc&lt;/CODE&gt; or &lt;CODE&gt;ac&lt;/CODE&gt;, because the &lt;CODE&gt;b&lt;/CODE&gt; would be optional since it's followed by a &lt;CODE&gt;?&lt;/CODE&gt;.&lt;/P&gt;</description>
    <pubDate>Sun, 17 Jan 2016 02:51:48 GMT</pubDate>
    <dc:creator>Richfez</dc:creator>
    <dc:date>2016-01-17T02:51:48Z</dc:date>
    <item>
      <title>Blue Coat Proxy Logs - User Agent Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227348#M188333</link>
      <description>&lt;P&gt;I can't find how to extract the User Agent field from the Blue Coat proxy logs. I couldn't find the correct answer yet on the forum. All of the answers I went through had regex that didn't work correctly. &lt;/P&gt;

&lt;P&gt;REGEX = (?&amp;lt;date&amp;gt;[^\s]+)\s+(?&amp;lt;time&amp;gt;[^\s]+)\s+(?&amp;lt;time_taken&amp;gt;[^\s]+)\s+(?&amp;lt;c_ip&amp;gt;[^\s]+)\s+(?&amp;lt;cs_username&amp;gt;[^\s]+)\s+(?&amp;lt;cs_auth_group&amp;gt;[^\s]+)\s+(?&amp;lt;x_exception_id&amp;gt;[^\s]+)\s+(?&amp;lt;filter_result&amp;gt;[^\s]+)\s+\"(?&amp;lt;category&amp;gt;[^\"]+)\"\s+(?&amp;lt;http_referrer&amp;gt;[^\s]+)\s+(?&amp;lt;sc_status&amp;gt;[^\s]+)\s+(?&amp;lt;action&amp;gt;[^\s]+)\s+(?&amp;lt;cs_method&amp;gt;[^\s]+)\s+(?&amp;lt;http_content_type&amp;gt;[^\s]+)\s+(?&amp;lt;cs_uri_scheme&amp;gt;[^\s]+)\s+(?&amp;lt;cs_host&amp;gt;[^\s]+)\s+(?&amp;lt;cs_uri_port&amp;gt;[^\s]+)\s+(?&amp;lt;cs_uri_path&amp;gt;[^\s]+)\s+(?&amp;lt;cs_uri_query&amp;gt;[^\s]+)\s+(?&amp;lt;cs_uri_extension&amp;gt;[^\s]+)\s+[\"]{0,1}(?&amp;lt;http_user_agent&amp;gt;[^\"]+)[\"]{0,1}&lt;/P&gt;

&lt;P&gt;[\"]{0,1}(?&amp;lt;http_user_agent&amp;gt;[^\"]+)[\"]{0,1}&lt;/P&gt;

&lt;P&gt;Extracts 'dashes like this, together with a dvc_ip. &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;10.106.4.11&lt;/LI&gt;
&lt;LI&gt;10.106.4.11&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Does anyone have this issues sorted out already? &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:23:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227348#M188333</guid>
      <dc:creator>daniel_augustyn</dc:creator>
      <dc:date>2020-09-29T08:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Blue Coat Proxy Logs - User Agent Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227349#M188334</link>
      <description>&lt;P&gt;Can you paste one of the events that are being mis... mis... what's the word?  Misinterpreted?  Misregexed?  Misparsed?  Well, no matter on the term.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Where in the event is "10.106.4.11"?  You could just be missing one extraction or something.&lt;/P&gt;

&lt;P&gt;FYI, optional characters or groups can be done like &lt;CODE&gt;ab?c&lt;/CODE&gt;, which would match &lt;CODE&gt;abc&lt;/CODE&gt; or &lt;CODE&gt;ac&lt;/CODE&gt;, because the &lt;CODE&gt;b&lt;/CODE&gt; would be optional since it's followed by a &lt;CODE&gt;?&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jan 2016 02:51:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227349#M188334</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-01-17T02:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Blue Coat Proxy Logs - User Agent Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227350#M188335</link>
      <description>&lt;P&gt;2016-01-18 04:09:52 226 10.115.2.45 - - - OBSERVED "Technology/Internet" -  302 TCP_NC_MISS GET text/html http portal.domain.net 80 / - - - 10.115.6.11 177 80 - "none" "none"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:27:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227350#M188335</guid>
      <dc:creator>daniel_augustyn</dc:creator>
      <dc:date>2020-09-29T08:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Blue Coat Proxy Logs - User Agent Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227351#M188336</link>
      <description>&lt;P&gt;The posted example does not contain a user agent string would look like this&lt;BR /&gt;
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2016 05:19:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227351#M188336</guid>
      <dc:creator>rfaircloth_splu</dc:creator>
      <dc:date>2016-01-18T05:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Blue Coat Proxy Logs - User Agent Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227352#M188337</link>
      <description>&lt;P&gt;It does contain "-" and this is why this log is messing the field extraction!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2016 17:00:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227352#M188337</guid>
      <dc:creator>daniel_augustyn</dc:creator>
      <dc:date>2016-01-18T17:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Blue Coat Proxy Logs - User Agent Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227353#M188338</link>
      <description>&lt;P&gt;Any idea how to include a "-" in the regex? &lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2016 17:22:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227353#M188338</guid>
      <dc:creator>daniel_augustyn</dc:creator>
      <dc:date>2016-01-18T17:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Blue Coat Proxy Logs - User Agent Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227354#M188339</link>
      <description>&lt;P&gt;This looks like bluecoat 6.5+ logging which is now covered in the Splunk supported TA&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?:"([^"]+)"|(\S+))\s+(?:"(\d{1,2}:\d{1,2}:\d{1,2})"|(\d{1,2}:\d{1,2}:\d{1,2}))\s+(?:"(\d+)"|(\d+))\s+(?:"(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})"|(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s+(?:"([^"]+)"|(\S+))\s*$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I recommend pulling the TA from splunk base and starting with the existing solution. What I don't like is the current code will permit - to enter into the field values. So I would add EVAL-field= nullif() to address that issue.&lt;/P&gt;

&lt;P&gt;Link for the new TA&lt;BR /&gt;
&lt;A href="https://splunkbase.splunk.com/app/2758/"&gt;TA for Bluecoat&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2016 18:03:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227354#M188339</guid>
      <dc:creator>rfaircloth_splu</dc:creator>
      <dc:date>2016-01-18T18:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Blue Coat Proxy Logs - User Agent Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227355#M188340</link>
      <description>&lt;P&gt;This totally fixed the issue. I downloaded the new add-on for new logs, and play with regex and it worked. Thanks a lot for your help on that. &lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 04:52:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Blue-Coat-Proxy-Logs-User-Agent-Field-Extraction/m-p/227355#M188340</guid>
      <dc:creator>daniel_augustyn</dc:creator>
      <dc:date>2016-01-19T04:52:08Z</dc:date>
    </item>
  </channel>
</rss>

