您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
version: '3.7'
services:
elasticsearch:
container_name: elasticsearch
image: elasticsearch
ports:
- 9200:9200
- 9300:9300
fluentd:
container_name: fluentd
image: fluent/fluentd
volumes:
- ./fluentd/conf:/fluentd/etc
links:
- elasticsearch
ports:
- 24224:24224
- 24224:24224/udp
kibana:
image: kibana
links:
- elasticsearch
ports:
- 5601:5601
nginx:
image: nginx
ports:
- 80:80
links:
- fluentd
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
tag: nginx-access
创建目录
fluentd/conf
在目录创建文件
<source>
@type forward
port 24224
bind 0.0.0.0
</source>
<match *.**>
@type copy
<store>
@type elasticsearch
host elasticsearch
port 9200
logstash_format true
logstash_prefix fluentd
logstash_dataformat %Y%m%d
include_tag_key true
type_name access_log
type_key @log_name
flush_interval 1s
</store>
<store>
@type stdout
</store>
</match>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。