- 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
LLM
promptfoo
GenAI
JavaScript
PowerShell
kibana
fluentd
elasticsearch
nginx
村川梨衣
五十嵐裕美
イベント
logrotate
IoT
Java
Scala
iputils
C言語
ICMP
WUG
mastodon
Swift
AWS
Clock
Windows
アーキテクチャ
PoEAA
iOS
DeviceFarm
プログラミング言語
OS
Lambda
StepFunctions
Serverless
terraform
ポエム
RHEL
ネットワーク
GraphQL
CloudWatch
Linux
Coreutils
telnet
network
nc
LinuxKernel
fpinscala
ELB
IAM
AppSync