syslog

command module
v0.0.0-...-fcd0a0a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2017 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

convox/syslog

Effortlessly forward all your container logs to a Syslog server.

On a container cluster, logs are generated from countless containers on countless hosts. We need to:

  • Collect all the container logs
  • Forward logs off the instances a centralized utility log service
  • Deliver, process, reformat and forward every log to one or more 3rd party log services

On AWS, CloudWatch Logs is the utility log service, offering high ingestion throughput and cheap storage. A Logs Subscription Filter coordinates the deceptively tough job of delivering every log to a custom Lambda Function log processor and syslog forwarder.

With Convox and AWS, you get a log pipeline that is:

  • Simple. convox logs and convox services add syslog --url are all you need to know
  • Secure. Logs stay in your AWS account and are wrapped in TLS before going anywhere else
  • Reliable. Let AWS do all the heavy-lifting
  • Scalable. 5 MB/sec per app
  • Affordable. 10 GB/mo of logs costs $5/mo to ingest and pennies to store and process
  • Configurable. Open source means you can understand and hack

Usage

$ convox services create syslog --name pt --url tcp+tls://log1.papertrailapp.com:11235
$ convox services link pt --app myapp

How It Works

Infrastructure:

  • Logs are sent from ECS to CloudWatch logs with the Docker awslogs driver.

Install:

  • Lambda Function, Permission, Role and Subscription are managed with CloudFormation
  • In convox/rack, the LogGroup Parameter is substitued with many App LogGroup values

Invoke:

  • On Lambda function invoke, describe CF stack to get runtime information like destination URL
  • Cache the URL to /tmp/url minimize subsequent CF DescribeStack calls

Process:

  • Dial syslog URL
  • Unpack CloudWatch Log events from Lambda context
  • Write logs lines

Report:

  • Log errors to Lambda CloudWatch Logs
  • TODO: Log how many lines processed, and how many successful and failed lines transmitted to CloudWatch Custom Metrics

Contributing

References

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址