Common Log Formats
This page is a glossary of common log formats that can be parsed with the Tail input plugin.
Apache Access Log
Use
format apache2
as shown below:Apache Error Log
Use a regular expression. See the
format
field in the following sample configuration.Depending on your particular error log format, you may need to adjust the regular expression above. You can test your format using fluentd-ui's in_tail editor or Fluentular.
Maillog
Use a regular expression. See the
format
field in the following sample configuration.Nginx Access Log
Use
format nginx
as shown below:Nginx Error Log
Use the
format*
andmultiline_flush_interval
fields in the following sample configuration. Applications running under Nginx can output multi-line errors including stack traces, so the multiline mode is a good fit.If you know your error log will only contain single lines, you can use the below simpler configuration with just a
format
.GlusterFS Logs
Use the GlusterFS input plugin.
Do you not see what you are looking for?
Give us a shout on GitHub, Twitter or the mailing list. Better yet, we always welcome a pull request!
If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is a open source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.
Last updated