This image use Logspout with Logspout-logstash plugin that provide functionality to send all logs to Logstash.
Logspout connect to all containers on same node, gather all their logs
from STDOUT and STDERR and proxy it to Logstash.
Images in this repository are tagged as follows:
0.0.1: standard SemVer.latest: the latest version recommended for use with other Monasca components.Logspout requires running instance of Monasca Log Agent.
To add service dimension that you would be able to filter by in Kibana
you need to initialize running containers with LOGSTASH_FIELDS environment
variable containing kye=value pair of service key and service name
as a value e.g.: "service=mysql".
Logspout will pickup this env variable and send proper data
to the Monasca Log Agent.
To handle multiline logging you need to pass a regex as a environment variable,
which matches the start of the multiline blocks e.g.:
MULTILINE_PATTERN=^(\\[?\\d{4}-\\d{2}-\\d{2}|{)
This example matches logs, which:
YYYY-MM-DD or [YYYY-MM-DDNote that in the case of a service generates logs, which don't follow any of these patterns,
the multiline bock will be chunked every period defined with MULTILINE_FLUSH_AFTER (default: 500 ms)
| Variable | Default | Description |
|---|---|---|
MONASCA_LOG_AGENT_URI | log-agent:5610 | Monasca Log Agent connection string |
ROUTE_URIS | multiline+logstash+tcp://log-agent:5610 | Logstash connection string |
Files build.sh and modules.go are used by Logspout Dockerfile
(with ONBUILD COPY command) and allow us to build resulting binary
with needed plugin.
Content type
Image
Digest
Size
15.2 MB
Last updated
almost 8 years ago
docker pull monasca/logspout