<?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 Custom Apache Log RegEx in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Custom-Apache-Log-RegEx/m-p/133688#M36509</link>
    <description>&lt;P&gt;hello.  I'll preference this with I'm not by any means a regex user.&lt;/P&gt;

&lt;P&gt;I'm working with a custom Apache format that Splunk 6 is not extracting correctly.  I'm just loosely trying to assign each Apache field an identifier so it will populate interesting fields.&lt;/P&gt;

&lt;P&gt;LogFormat "%h %{forwarded}e %{host}i %t %D \"%r\" %&amp;gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined&lt;/P&gt;

&lt;P&gt;log-example&lt;BR /&gt;
1.1.1.1 2.2.2.2 host.domain.com [07/Nov/2013:21:59:49 +0000] 88040 "GET /api/v3/projects HTTP/1.1" 200 82 "referer_URL_here_because_ask_site_won't_let_me_post" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:25.0) Gecko/20100101 Firefox/25.0"&lt;/P&gt;

&lt;P&gt;I'm assigning the sourcetype on the UF as "access_custom".  Here are my props and transforms.  Any help would be greatly appreciated.&lt;/P&gt;

&lt;P&gt;[access_custom]&lt;BR /&gt;
TRANSFORM-format=apache_format&lt;/P&gt;

&lt;P&gt;[apache_format]&lt;BR /&gt;
REGEX=(.&lt;EM&gt;) (.&lt;/EM&gt;) (.&lt;EM&gt;) [(.&lt;/EM&gt;)] (.&lt;EM&gt;) \"(.&lt;/EM&gt;)\" ([0-9]&lt;EM&gt;) ([0-9]&lt;/EM&gt;) \"(.&lt;EM&gt;)\" \"(.&lt;/EM&gt;)\"&lt;BR /&gt;
FORMAT=remotehost::$1 clientip::$2 hostheader::$3 timestamp::$4 req_time::$5 url::$6 statuscode::$7 bytes::$8 referer::$9 user-agent::$10 &lt;/P&gt;

&lt;P&gt;thxs!&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:13:53 GMT</pubDate>
    <dc:creator>ctripod</dc:creator>
    <dc:date>2020-09-28T15:13:53Z</dc:date>
    <item>
      <title>Custom Apache Log RegEx</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-Apache-Log-RegEx/m-p/133688#M36509</link>
      <description>&lt;P&gt;hello.  I'll preference this with I'm not by any means a regex user.&lt;/P&gt;

&lt;P&gt;I'm working with a custom Apache format that Splunk 6 is not extracting correctly.  I'm just loosely trying to assign each Apache field an identifier so it will populate interesting fields.&lt;/P&gt;

&lt;P&gt;LogFormat "%h %{forwarded}e %{host}i %t %D \"%r\" %&amp;gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined&lt;/P&gt;

&lt;P&gt;log-example&lt;BR /&gt;
1.1.1.1 2.2.2.2 host.domain.com [07/Nov/2013:21:59:49 +0000] 88040 "GET /api/v3/projects HTTP/1.1" 200 82 "referer_URL_here_because_ask_site_won't_let_me_post" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:25.0) Gecko/20100101 Firefox/25.0"&lt;/P&gt;

&lt;P&gt;I'm assigning the sourcetype on the UF as "access_custom".  Here are my props and transforms.  Any help would be greatly appreciated.&lt;/P&gt;

&lt;P&gt;[access_custom]&lt;BR /&gt;
TRANSFORM-format=apache_format&lt;/P&gt;

&lt;P&gt;[apache_format]&lt;BR /&gt;
REGEX=(.&lt;EM&gt;) (.&lt;/EM&gt;) (.&lt;EM&gt;) [(.&lt;/EM&gt;)] (.&lt;EM&gt;) \"(.&lt;/EM&gt;)\" ([0-9]&lt;EM&gt;) ([0-9]&lt;/EM&gt;) \"(.&lt;EM&gt;)\" \"(.&lt;/EM&gt;)\"&lt;BR /&gt;
FORMAT=remotehost::$1 clientip::$2 hostheader::$3 timestamp::$4 req_time::$5 url::$6 statuscode::$7 bytes::$8 referer::$9 user-agent::$10 &lt;/P&gt;

&lt;P&gt;thxs!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:13:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-Apache-Log-RegEx/m-p/133688#M36509</guid>
      <dc:creator>ctripod</dc:creator>
      <dc:date>2020-09-28T15:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Apache Log RegEx</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-Apache-Log-RegEx/m-p/133689#M36510</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;[apache_format]
REGEX=([\d\.]+)\s([\d\.]+)\s([\w\.]+)\s\[(\d+\/\w+\/\d+\:\d+\:\d+\:\d+\s\+\d+)]\s(\d+)\s\"(\w\/\s\.)\"\s(\d+)\s(\d+)\s\"([\w\-]+)\"\s\"([\w\d\.\;\,\/\\\s\:])\\(\)"
FORMAT=remotehost::$1 clientip::$2 hostheader::$3 timestamp::$4 req_time::$5 url::$6 statuscode::$7 bytes::$8 referer::$9 user-agent::$10
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Nov 2013 23:51:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-Apache-Log-RegEx/m-p/133689#M36510</guid>
      <dc:creator>ShaneNewman</dc:creator>
      <dc:date>2013-11-07T23:51:31Z</dc:date>
    </item>
  </channel>
</rss>

