Fluentd
Search…
1.0
Introduction
Overview
Installation
Configuration
Deployment
Container Deployment
Monitoring Fluentd
Input Plugins
Output Plugins
Filter Plugins
Parser Plugins
regexp
apache2
apache_error
nginx
syslog
ltsv
csv
tsv
json
msgpack
multiline
none
Formatter Plugins
Buffer Plugins
Storage Plugins
Service Discovery Plugins
Metrics Plugins
How-to Guides
Language Bindings
Plugin Development
Plugin Helper API
Troubleshooting Guide
Powered By
GitBook
nginx
The
nginx
parser plugin parses the default Nginx logs.
Parameters
See
Parse Section Configurations
.
Regexp Patterns
Here is the regexp and time format patterns of this plugin:
1
expression /^(?<remote>[^ ]*) (?<host>[^ ]*) (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^\"]*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)"(?:\s+(?<http_x_forwarded_for>[^ ]+))?)?$/
2
time_format %d/%b/%Y:%H:%M:%S %z
Copied!
remote
,
user
,
method
,
path
,
code
,
size
,
referer
,
agent
and
http_x_forwarded_for
are included in the event record.
time
is used for the event time.
Example
This incoming event:
1
127.0.0.1 192.168.0.1 - [28/Feb/2013:12:00:00 +0900] "GET / HTTP/1.1" 200 777 "-" "Opera/12.0" -
Copied!
is parsed as:
1
time:
2
1362020400 (28/Feb/2013:12:00:00 +0900)
3
​
4
record:
5
{
6
"remote" : "127.0.0.1",
7
"host" : "192.168.0.1",
8
"user" : "-",
9
"method" : "GET",
10
"path" : "/",
11
"code" : "200",
12
"size" : "777",
13
"referer" : "-",
14
"agent" : "Opera/12.0",
15
"http_x_forwarded_for": "-"
16
}
Copied!
If this article is incorrect or outdated, or omits critical information, please
let us know
.
Fluentd
is an open-source project under
Cloud Native Computing Foundation (CNCF)
. All components are available under the Apache 2 License.
Previous
apache_error
Next
syslog
Last modified
1yr ago
Copy link
Contents
Parameters
Regexp Patterns
Example