Skip to content

Instantly share code, notes, and snippets.

@tuki0918
Created November 24, 2014 13:59
Show Gist options
  • Save tuki0918/d8ca229626fbeb335bf5 to your computer and use it in GitHub Desktop.
Save tuki0918/d8ca229626fbeb335bf5 to your computer and use it in GitHub Desktop.
Fluentd: php_errors_log
<source>
type tail
format /^\[(?<time>[^\]]*)\] (?<message>.*)$/
path /var/log/php_errors.log
pos_file /var/log/td-agent/php_errors_log.pos
tag php.errors_log
</source>
<match php.errors_log>
type elasticsearch
host localhost
port 9200
index_name php
type_name errors_log
include_tag_key true
tag_key @log_name
logstash_format true
time_format %Y-%m-%d %H:%M:%S
</match>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment