Skip to content

ms-bootcamp/mst-efk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Docker images for fluentd

docker build -t demo/fluentd:v0.14 .

NOTE Use domain name docker.for.mac.localhost as Consul backend address. See more details in CONNECT FROM A CONTAINER TO A SERVICE ON THE HOST

Launch Consul agent

consul agent -dev -node=consul -data-dir=/tmp/consul

Then open http://127.0.0.1:8500/ and create Key/Value:

  • fluentd/source
<source>
  @type forward
  port 5140
</source>
<source>
   @type beats
   metadata_as_tag
   <parse>
      @type json
   </parse>
</source>
  • fluentd/filter
<filter nginx.**>
  @type parser
  format json
  key_name log
  reserve_data true
</filter>
  • fluentd/match
<match nginx.backend>
   @type elasticsearch
   host elasticsearch
   port 9200
   logstash_format true
   logstash_prefix nginx
</match>
<match docker.**>
   @type elasticsearch
   host elasticsearch
   port 9200
   logstash_format true
   logstash_prefix app
</match>

Start services

docker-compose up

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages