1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 03:48:44 +00:00

add gelf support to ELK

This commit is contained in:
kev 2018-01-25 16:01:00 +08:00
parent 299d84de53
commit f2ded6291a
3 changed files with 27 additions and 0 deletions

@ -35,3 +35,26 @@ actions:
$ pip install elasticsearch-curator
$ curator delete-indices.yml
```
## Send container's log to ELK
```nginx
input {
gelf {
port => 12201
}
}
```
```yaml
test:
image: alpine
command: 'sh -c "while :; do date; sleep 1; done"'
log_driver: gelf
log_opt:
gelf-address: udp://x.x.x.x:12201
tag: test
```
Search `tag: test` in kibana to show recent logging.

@ -2,6 +2,9 @@ input {
beats {
port => 5044
}
gelf {
port => 12201
}
}
output {

@ -20,6 +20,7 @@ logstash:
ports:
- "5044:5044"
- "9600:9600"
- "12201:12201/udp"
links:
- elasticsearch
volumes: