remote_syslog2 icon indicating copy to clipboard operation
remote_syslog2 copied to clipboard

Delay sending to Papertrail with a configurable window

Open shanab opened this issue 8 years ago • 0 comments

Setup

Whenever a new server starts, the following happens in order:

  • Register itself automatically to Papertrail via Register HTTP API.
  • Start remote_syslog2 init script.
  • Start a service that produces log events into log files.

Problem

Papertrail starts displaying events about 1-2 minutes after the service starts. This is not optimal since we would like to see initial logs when a service is starting (or if it fails to start for example).

Patched Solution

The way we resolved this for now is that we force the init script that registers to Papertrail to sleep for 2 minutes after it's done, and then start executing remote syslog & the service's init script later.

Suggestion

If remote_syslog2 can provide a delay flag, so that it can buffer log events for a configurable amount of time (2 minutes works in our case), and then send everything to Papertrail once the duration is over, that would be a better solution as we won't need to delay our service's init script from running.

shanab avatar Dec 13 '16 12:12 shanab