docker efk搭建
docker-compose.yml
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
在目录创建文件
fluent.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>
相关推荐
molong0 2020-06-13
东杰书屋 2020-01-28
85991738 2020-01-11
yelllowcong 2019-11-12
yelllowcong 2019-07-01
大木行走 2019-07-01
swarm笨笨 2019-07-01
willluckysmile 2019-06-30
BlackWing 2019-06-30
wanchaopeng 2019-06-21
东杰书屋 2019-06-21
StupidBird00 2019-05-29
东杰书屋 2019-04-25
StupidBird00 2018-12-24
cullinans 2018-06-13
cullinans 2019-04-24
BlackWing 2019-04-20
zhuimuzhuimu 2012-09-27