-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask-logs-docker.yaml
49 lines (42 loc) · 1.6 KB
/
task-logs-docker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
version: 2
schedule:
type: streaming
plugins:
- plugin_name: docker-logs
config:
## Configure Docker containers logs collection:
## - "enable" switch allows to turn on/off running docker containers logs collector.
## - "endpoint" configures docker service endpoint. Defaults to unix:///var/run/docker.sock
## - "timeout" sets time for calling docker api.
## - "logs" defines the list of filters.
## - "filters" sets filters for getting interesting containers.
## More can be found here: https://docs.docker.com/engine/api/v1.39/#operation/ContainerList
## - "options" sets options for container logs.
## More can be found here: https://docs.docker.com/engine/api/v1.39/#operation/ContainerLogs
## - "allow_tty" allows to read logs from container started with opitons -t.
## - "exclude_variables" allows the ignore container by setting container label.
## Second option for ignoring container is to set for container environment variable:
## Examle: -e "LOGS=ignore" or -e "LOGS=IGNORE"
endpoint: unix:///var/run/docker.sock
timeout: 10s
logs:
- filters:
status:
running: true
options:
showstdout: true
showstderr: true
since: ''
follow: true
tail: all
allow_tty: false
exclude_variables:
- not-log
#metrics:
# - /docker-logs/[container]/string_line
#tags:
# /docker-logs/[container=my_container]/string_line:
# sometag: somevalue
publish:
- plugin_name: loggly-http-bulk