Configuration
Copy and paste to fluent.conf
or td-agent.conf
<source>
type tail
path /var/log/foo/bar.log
pos_file /var/log/td-agent/foo-bar.log.pos
tag foo.bar
format /(?<remote_address>[^ ]*) (?<remote_logname>[^ ]*) (?<remote_user>[^ ]*) (?<request_time>[^\]]*) (?<request_line>[^ ]* +\S* +\S*) (?<status_code>[^ ]*) (?<size_of_the_response_body>[^ ]*) "(?<user_agent>[^\"]*)"/
</source>
type tail
path /var/log/foo/bar.log
pos_file /var/log/td-agent/foo-bar.log.pos
tag foo.bar
format /(?<remote_address>[^ ]*) (?<remote_logname>[^ ]*) (?<remote_user>[^ ]*) (?<request_time>[^\]]*) (?<request_line>[^ ]* +\S* +\S*) (?<status_code>[^ ]*) (?<size_of_the_response_body>[^ ]*) "(?<user_agent>[^\"]*)"/
</source>
Data Inspector
Attributes
Key | Value |
---|---|
time | 2023/12/01 05:44:36 +0000 |
Records
Key | Value |
---|---|
remote_address | 59.106.108.116 |
remote_logname | - |
remote_user | - |
request_time | 2016/10/12:23:56:12 |
request_line | "GET / HTTP/2" |
status_code | 200 |
size_of_the_response_body | 6040 |
user_agent | mackerel-http-checker/0.0.1 |