httpd
's logs will be ingested into Elasticsearch + Kibana, via Fluentd.docker-compose.yml
for Docker Compose. Docker Compose is a tool for defining and running multi-container Docker applications.logging
section (check Docker Compose documentation) of web
container specifies Docker Fluentd Logging Driver as a default container logging driver. All of the logs from web
container will be automatically forwarded to host:port specified by fluentd-address
.fluentd/Dockerfile
with the following content, to use Fluentd's official Docker image and additionally install Elasticsearch plugin.fluentd/conf/fluent.conf
. in_forward plugin is used for receive logs from Docker logging driver, and out_elasticsearch is for forwarding logs to Elasticsearch.docker ps
command.httpd
to generate some access logs. curl
command is always your friend.http://localhost:5601/
with your browser. Then, you need to set up the index name pattern for Kibana. Please specify fluentd-*
to Index name or pattern
and press Create
button.Discover
tab to seek for the logs. As you can see, logs are properly collected into Elasticsearch + Kibana, via Fluentd.