728x90
반응형
서버간 연동
aggregator 서버
<source>
@type forward
@id input_forward
port 24232
bind 0.0.0.0
</source>
<match nginx.**>
@type stdout
@id output_nginx
@log_level debug
</match>
forwarder 서버
<source>
@type tail
@label @NGINX_LOG
@id NGINX_ACCESS_LOG
tag nginx.access
path /var/log/nginx/access.log
pos_file /var/log/td-agent/nginx-access.log.pos
<parse>
@type nginx
</parse>
</source>
<source>
@type tail
@label @NGINX_LOG
@id NGINX_ERROR_LOG
tag nginx.error
path /var/log/nginx/error.log
pos_file /var/log/td-agent/nginx-error.log.pos
<parse>
@type nginx
</parse>
</source>
#############################################
<label @NGINX_LOG>
<match nginx.*>
@type forward
@id output_nginx
send_timeout 60s
recover_wait 10s
hard_timeout 60s
<server>
name main_node
host 192.168.10.7
port 24232
weight 60
</server>
<secondary>
@type file
path /var/log/td-agent/td-agnt-nginx-fail.log
</secondary>
@log_level debug
</match>
</label>
<source>
@type forward
@id input_forward
port 24232
bind 0.0.0.0
</source>
<match apps.**>
@type forward
@id output_apps
send_timeout 60s
recover_wait 10s
hard_timeout 60s
<server>
name main_node
host 192.168.10.7
port 24232
weight 60
</server>
<secondary>
@type file
path /var/log/td-agent/td-agnt-nginx-fail.log
</secondary>
</match>
728x90
반응형
'Infrastructure > Fluentd' 카테고리의 다른 글
[Fluentd] 8. Prometheus 연동 (0) | 2021.05.11 |
---|---|
[Fluentd] 7. Nginx 연동 (0) | 2021.05.11 |
[Fluentd] 5. Output plugin (0) | 2021.05.11 |
[Fluentd] 4. Input plugin (0) | 2021.05.11 |
[Fluentd] 3. 설정 파라미터 (0) | 2021.05.11 |