title: LogStach-Grok: How to match Apache TimeStamp
body: <p>I have no idea how to match my TimeStamp. Could someone please help me?</p>
  
  <p>Example of my TimeStamps from Apache Log: <code>"2016-06-13T14:54:39.000+0100"</code></p>
  
  <pre><code>filter {   if [type] == "apache" {
      grok {
        match =&gt; { "message" =&gt; "%{COMBINEDAPACHELOG}" }   }
      date {
        timezone     =&gt; "UTC"
        match        =&gt; [ "timestamp" , "yyyy-mm-ddTHH:mm:ss Z"]
      }   } }
  
  output {   stdout { codec =&gt; rubydebug } }
  </code></pre>
  
  <p>Output: </p>
  
  <blockquote>
    <p>{:timestamp=>"2016-06-13T14:56:43.196000+0100", :message=>"Error:
    Cannot register filter date plugin. The error reported is: \n  Illegal
    pattern component: T for pattern 'yyyy-mm-dd\THH:mm:ss Z'",
    :level=>:error}</p>
  </blockquote>
  
  <p>Apache Log Example:</p>
  
  <blockquote>
    <p>{ "@version": "1", "@timestamp": "2016-06-14T09:11:23.000+0100",
    "message": "GET /page1/page2/
    HTTP/1.1", "via": "192.168.1.1", "client-ip": "192.168.1.23",
    "remote-logname": "-", "remote-user": "-", "recv-time":
    "[14/Jun/2016:09:11:23 +0100]", "serve-time-microsec": "85471",
    "request": "GET /page1/page2/
    HTTP/1.1", "status": "200", "size": "79648", "referer":
    "<a href="http://www.google.com/" rel="nofollow">http://www.google.com/</a>", "user-agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US;
    rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13", "url":
    "/page1/page2/", "query": "",
    "method": "GET", "protocol": "HTTP/1.1", "vhost": "www.site.com",
    "received-size": "998" }</p>
  </blockquote>