Sign inSign up

monasca/logspout

By monasca

•Updated almost 8 years ago

Image
0

1.3K

monasca/logspout repository overview

⁠Logspout

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.

⁠Tags

Images in this repository are tagged as follows:

  • 0.0.1: standard SemVer⁠.
  • latest: the latest version recommended for use with other Monasca components.

⁠Usage

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.

⁠Multiline logging

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:

  • start with a timestamp with format YYYY-MM-DD or [YYYY-MM-DD
  • are json-logs

Note 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)

⁠Configuration

VariableDefaultDescription
MONASCA_LOG_AGENT_URIlog-agent:5610Monasca Log Agent connection string
ROUTE_URISmultiline+logstash+tcp://log-agent:5610Logstash connection string

⁠Additional files

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.

Tag summary

Content type

Image

Digest

Size

15.2 MB

Last updated

almost 8 years ago

docker pull monasca/logspout