You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+65-23Lines changed: 65 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,7 @@ You can tell logspout to only display log entries since container "start" or "re
97
97
98
98
The default behaviour is to output all logs since creation of the container (equivalent to `docker logs --tail=all` or simply `docker logs`).
99
99
100
-
> NOTE: Use of this option **may** cause the first few lines of log output to be missed following a container being started, if the container starts outputting logs before logspout has a chance to see them. If consistent capture of *every* line of logs is critical to your application, you might want to test thorougly and/or avoid this option (at the expense of getting the entire backlog for every restarting container). This does not affect containers that are removed and recreated.
100
+
> NOTE: Use of this option **may** cause the first few lines of log output to be missed following a container being started, if the container starts outputting logs before logspout has a chance to see them. If consistent capture of *every* line of logs is critical to your application, you might want to test thoroughly and/or avoid this option (at the expense of getting the entire backlog for every restarting container). This does not affect containers that are removed and recreated.
101
101
102
102
103
103
#### Environment variable, TAIL
@@ -157,7 +157,7 @@ Using the environment variable `MULTILINE_MATCH`=<first|last|nonfirst|nonlast> (
157
157
* nonfirst: append all matching lines to first line and start over with the next non-matching line
158
158
159
159
##### Important!
160
-
If you use multiline logging with raw, it's recommended to json encode the Data to avoid linebreaks in the output, eg:
160
+
If you use multiline logging with raw, it's recommended to json encode the Data to avoid line breaks in the output, eg:
161
161
162
162
"RAW_FORMAT={{ toJSON .Data }}\n"
163
163
@@ -167,8 +167,9 @@ If you use multiline logging with raw, it's recommended to json encode the Data
167
167
*`BACKLOG` - suppress container tail backlog
168
168
*`TAIL` - specify the number of lines in the log tail to capture when logspout starts (default `all`)
169
169
*`DEBUG` - emit debug logs
170
-
*`EXCLUDE_LABEL` - exclude logs with a given label
170
+
*`EXCLUDE_LABEL` - exclude containers with a given label. The label can have a value of true or a custom value matched with : after the label name like label_name:label_value.
171
171
*`INACTIVITY_TIMEOUT` - detect hang in Docker API (default 0)
172
+
*`HTTP_BIND_ADDRESS` - configure which interface address to listen on (default 0.0.0.0)
172
173
*`PORT` or `HTTP_PORT` - configure which port to listen on (default 80)
173
174
*`RAW_FORMAT` - log format for the raw adapter (default `{{.Data}}\n`)
174
175
*`RETRY_COUNT` - how many times to retry a broken socket (default 10)
@@ -238,34 +239,75 @@ networks:
238
239
logging:
239
240
services:
240
241
logspout:
241
-
image: gliderlabs/logspout:latest
242
-
networks:
243
-
- logging
244
-
volumes:
245
-
- /etc/hostname:/etc/host_hostname:ro
246
-
- /var/run/docker.sock:/var/run/docker.sock
247
-
command:
248
-
syslog://svt2-logger.am2.cloudra.local:514
249
-
deploy:
250
-
mode: global
251
-
resources:
252
-
limits:
253
-
cpus: '0.20'
254
-
memory: 256M
255
-
reservations:
256
-
cpus: '0.10'
257
-
memory: 128M
242
+
image: gliderlabs/logspout:latest
243
+
networks:
244
+
- logging
245
+
volumes:
246
+
- /etc/hostname:/etc/host_hostname:ro
247
+
- /var/run/docker.sock:/var/run/docker.sock
248
+
command:
249
+
syslog://svt2-logger.am2.cloudra.local:514
250
+
deploy:
251
+
mode: global
252
+
resources:
253
+
limits:
254
+
cpus: '0.20'
255
+
memory: 256M
256
+
reservations:
257
+
cpus: '0.10'
258
+
memory: 128M
258
259
```
259
260
260
-
logspout can then be deployed as a global service in the swam with the following command
261
+
logspout can then be deployed as a global service in the swarm with the following command
261
262
262
263
```bash
263
-
docker stack deploy --compose-file <name of your compose file>
264
+
docker stack deploy --compose-file <name of your compose file> STACK
264
265
```
265
266
266
267
More information about services and their mode of deployment can be found here:
logspout supports modification of the client TLS settings via environment variables described below:
272
+
273
+
| Environment Variable | Description |
274
+
| :--- | :--- |
275
+
|`LOGSPOUT_TLS_DISABLE_SYSTEM_ROOTS`| when set to `true` it disables loading the system trust store into the trust store of logspout |
276
+
|`LOGSPOUT_TLS_CA_CERTS`| a comma seperated list of filesystem paths to pem encoded CA certificates that should be added to logsput's TLS trust store. Each pem file can contain more than one certificate |
277
+
|`LOGSPOUT_TLS_CLIENT_CERT`| filesytem path to pem encoded x509 client certificate to load when TLS mutual authentication is desired |
278
+
|`LOGSPOUT_TLS_CLIENT_KEY`| filesytem path to pem encoded client private key to load when TLS mutual authentication is desired |
279
+
|`LOGSPOUT_TLS_HARDENING`| when set to `true` it enables stricter client TLS settings designed to mitigate some known TLS vulnerabilities |
280
+
281
+
#### Example TLS settings
282
+
The following settings cover some common use cases.
283
+
When running docker, use the `-e` flag to supply environment variables
284
+
285
+
**add your own CAs to the list of trusted authorities**
The standard distribution of logspout comes with all modules defined in this repository. You can remove or add new modules with custom builds of logspout. In the `custom` dir, edit the `modules.go` file and do a `docker build`.
@@ -282,7 +324,7 @@ The standard distribution of logspout comes with all modules defined in this rep
0 commit comments