- syslog フォーマットが便利
送り側
# config for /var/log/messages
<source>
@type tail
format syslog
path /var/log/messages
pos_file /var/log/td-agent/pos/var.log.messages.pos
read_from_head true
tag syslog.messages
</source>
<filter syslog.messages>
@type record_transformer
<record>
hostname ${hostname}
</record>
</filter>
{% if server_role != "aggregate" %}
<match syslog.messages>
@type forward
<server>
name back
host {{ back_hostname }}
</server>
buffer_type file
buffer_path /var/log/td-agent/buffer/syslog.messages
</match>
{% endif %}
受け側
{% if server_role == "aggregate" %}
# config for /var/log/messages
<match syslog.messages>
@type copy
<store>
@type elasticsearch
logstash_format true
logstash_prefix syslog.messages
include_timestamp true
hosts {{ back_hostname }}
port 9200
buffer_type file
buffer_path /var/log/td-agent/buffer/syslog.messages.back
buffer_chunk_limit 128k
buffer_queue_limit 128
</store>
</match>
{% endif %}
Pinned Articles
About
ウェブ界隈でエンジニアとして労働活動に励んでいる @gomi_ningen 個人のブログです
Tags
GenAI
JavaScript
PowerShell
fluentd
kibana
elasticsearch
nginx
五十嵐裕美
村川梨衣
イベント
logrotate
IoT
Java
Scala
ICMP
iputils
C言語
WUG
mastodon
AWS
Swift
Clock
Windows
PoEAA
アーキテクチャ
iOS
DeviceFarm
プログラミング言語
OS
StepFunctions
Lambda
Serverless
terraform
ポエム
RHEL
ネットワーク
GraphQL
CloudWatch
Linux
Coreutils
nc
telnet
network
LinuxKernel
fpinscala
ELB
IAM
AppSync
EFS
Gradle