Papertrail installation and configurations

I am using a paper-trail for the logging. It is very easy to use. But when I want to configure Nginx logs or whatever the path of the log, I need to re-configure the configuration. I always forget once in a while, so I am writing down this to note myself.

So, here is my note…

The following script will make the syslogs daemon and will sent logs to papertail

# This will setup the papertrail
wget -qO - --header="X-Papertrail-Token: {token}" \
https://papertrailapp.com/destinations/1639743/setup.sh | sudo bash

In order to send application custom logs, you need to install remote_syslog2 and sent it over. To do that create a yml file in /etc/log_files.yml and put the following configuration.

files: 
  - /var/log/nginx/*.log
destination:
  host: logs6.papertrailapp.com
  port: 11218
  protocol: tls
pid_file: /var/run/remote_syslog.pid

To integrate with Slack, you can check out the following link… https://help.papertrailapp.com/kb/integrations/slack

one response for Papertrail installation and configurations

  1. […] are moving our application logging to Datadog. I write about Papertrail installation and configuration in the past. We are moving our logging to Datadog since all our monitoring is there. So, we can […]

  2. Leave a Reply