Skip to content

Instantly share code, notes, and snippets.

@DavidAntaramian
Created September 20, 2017 01:25
Show Gist options
  • Save DavidAntaramian/d86c521d7ae90b2e946e9726639e950d to your computer and use it in GitHub Desktop.
Save DavidAntaramian/d86c521d7ae90b2e946e9726639e950d to your computer and use it in GitHub Desktop.
# This should be at in /var/logrotate.d/timber-agent.conf
/var/log/timber-agent.log {
missingok
notifempty
size 100K
rotate 2
postrotate
service timber-agent restart
endscript
}
# This goes at /etc/init/timber-agent.conf
description "Timber.io agent for log collection"
author "Timber Technologies, Inc."
start on (filesystem and net-device-up IFACE!=lo and runlevel [345])
stop on shutdown
exec /opt/timber-agent/bin/timber-agent capture-files --config /etc/timber.toml --output-log-file /var/log/timber-agent.log --pidfile /var/run/timber-agent.pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment