Use tag name
Collecting Logs into Elasticsearch and S3 | Fluentd
<source> type tail format apache path /var/log/httpd/access_log pos_file /var/log/td-agent/httpd.access.pos tag hostname.httpd.access
<
/source>
match *.*
<
>
type elasticsearch host localhost port 9200 include_tag_key true tag_key @log_name logstash_format true flush_interval 10s
/match
<
>
2.
fukata/fluent-plugin-hostname
<source>
type syslog
port 5140
bind 0.0.0.0
format /^(?
</source><match system.** >
type hostname
key_name @source_host
add_prefix es
</match><match es.system.** > </match>
type elasticsearch
logstash_format true
host 192.168.1.253
port 9200
index_name fluentd
type_name syslog
flush_interval 1s
include_tag_key true
tag_key @log_name
3.
repeatedly/fluent-plugin-record-modifier
沒有留言:
張貼留言