nginx logs are not parsed using grok pattern
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- nginx, ruby
- 领域
- backend, observability
调研方向
首先复现所提供的 Fluentd 配置,并将其输出的记录与 issue 中显示的 Nginx 日志进行比较。调查为什么该模式在外部 Grok 调试器中有效,但在此 parser 配置下无效。当 access log 字段在 Fluentd 中被正确解析,且生成的记录包含预期值时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
I am using below grok_pattern for parsing Nginx logs
<source>
@type tail
path /data/nginxlogs/access.log
pos_file /var/log/td-agent/nginx-access.log.pos
tag es.nginx.acces
<parse>
@type multiline_grok
<grok>
pattern Started %{IPORHOST:client_ip} %{USER:ident} %{USER:auth} \[%{HTTPDATE:timestamp}\] \"%{WORD:method} %{NOTSPACE:request_page} HTTP/%{NUMBER:http_version}\" %{NUMBER:server_response} %{NUMBER:bytes} \"%{URI:referrer}\" %{QS:user_agent}
# grok_pattern %{MY_SUPER_PATTERN}
# custom_pattern_path /etc/td-agent/MY_SUPER_PATTERN
# multiline_start_regexp /^[^\s]/
</grok>
keep_time_key true
</parse>
</source>
<filter es.nginx.acces>
@type record_transformer
<record>
hostname ${hostname}
</record>
</filter>
<match es.**>
type "aws-elasticsearch-service"
type_name "access_log"
logstash_format true
logstash_prefix "ngrokcontainer"
include_tag_key true
tag_key "@log_name"
flush_interval 1s
<endpoint>
url http://testing-logs-ab-east-1.es.amazonaws.com
region us-east-1
</endpoint>
</match>
Kibana :
| message | 3.231.213.28 - - [18/Apr/2020:22:20:16 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.47.0" "-" |
|---|---|
| Its not parsing properly, but when I check this grok debugger its working fine. | |
| Please let me know how I can fix this issue |
- 主要语言
- Ruby
- 星标
- 108
- 派生
- 32
- 平均合并
- 1 小时 47 分钟
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fluent/fluent-plugin-grok-parser 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
-
难度 3/5 1-2 天 新手友好度 38/100
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 1/5 1 小时以内 新手友好度 48/100
-
难度 3/5 1-2 天 新手友好度 30/100
查看 fluent/fluent-plugin-grok-parser 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
L: javascript
难度 2/5 1-3 小时 新手友好度 72/100
dependabot/dependabot-core#16744 ·
维护者通常 1 天内回复
-
area:core-lib P2 size:S
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复