-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogspout.yml
More file actions
46 lines (43 loc) · 1.14 KB
/
logspout.yml
File metadata and controls
46 lines (43 loc) · 1.14 KB
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
# WARN : not working
# Add a new file /etc/rsyslog.d/10-docker-logs.conf
# provides UDP syslog reception
# module(load="imudp")
# input(type="imudp" port="514")
# provides TCP syslog reception
# module(load="imtcp")
# input(type="imtcp" port="514")
# $FileCreateMode 0644
# template(name="DockerLogFileName" type="list") {
# constant(value="/var/log/docker-containers/")
# property(name="syslogtag" securepath="replace" \
# regex.expression="docker-\\(.*\\)\\[" regex.submatch="1")
# constant(value="/docker.log")
# }
# if $syslogtag startswith 'docker-' then ?DockerLogFileName
# $FileCreateMode 0600
#
# then: systemctl restart rsyslog.service
version: '3.7'
services:
logspout:
image: gliderlabs/logspout
hostname: logspout
ports:
- target: 80
published: 18080
mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime
networks:
- logspout-net
command:
syslog://10.205.33.1:514
networks:
logspout-net:
name: logspout-net
driver: overlay
ipam:
driver: default
config:
- subnet: 10.205.33.0/24