The log_format configuration does not match the sample output you provided
(beginning at $request_time)

On Thu, Jan 22, 2015 at 12:43 AM, Yanhong Wu <[email protected]> wrote:

> sorry, the above $cookie_username was broken when being copied from two
> lines. The real variable name is $cookie_username, no blank within.
>
> On Thu, Jan 22, 2015 at 4:39 PM, Yanhong Wu <[email protected]> wrote:
>
>> Hi,
>>
>> I have configured logformat configuration as following lines:
>>
>>  [nginx_access_decoder.config]
>>  type = "nginx.access"
>>  log_format = '$remote_addr - [$time_local] "$request_time
>> $upstream_response_time $gzip_ratio" "$server_name" "$request" $status
>> $body_bytes_sent "$http_referer" "$http_user_agent" username:$cook
>>  ie_username,userid:$cookie_userid'
>>
>>
>> The log_format is the one I copied from nginx conf, but heka failed to
>> parse the log.  My nginx access logs look like this:
>>
>>
>> 2015/01/22 16:26:26 Decoder 'nginx_access_logs-nginx_access_decoder-1'
>>> error: Failed parsing: 222.79.71.23 - [22/Jan/2015:16:20:23 +0800]  "0.049
>>> 0.048 -" "www.shanbay.com" "PUT /api/v1/bdc/review/12546927337
>>> HTTP/1.0" 200 101 "-" "com.somesite.words/3.5.029
>>> (Android,4.3,GT-I9500,samsung)" username:-,userid:104544524769
>>
>>
>>
>> Please help me find the solution
>>
>>
>> --
>> *wyh*
>>
>>
>>
>
>
> --
> *wyh*
>
>
>
> _______________________________________________
> Heka mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/heka
>
>
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to