-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Alex Musayev edited this page Feb 21, 2017
·
11 revisions
Prod log tail:
ssh -i ~/.ssh/scaleway [email protected] "tail -f -n 100 /var/www/feeder/current/log/production.log"
Install Papertrail remote_syslog2 on Scaleway instance (see releases):
ssh -i ~/.ssh/scaleway [email protected]
wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20-beta1/remote_syslog_linux_i386.tar.gz
tar xzf ./remote_syslog_linux_i386.tar.gz
cd remote_syslog/
sudo cp ./remote_syslog /usr/local/bin
Log streaming configuration: /etc/log_files.yml
files:
- /var/www/feeder/current/log/production.log
- /var/www/feeder/current/log/cron.log
- /var/log/nginx/error.log
- /var/log/nginx/access.log
destination:
host: logs3.papertrailapp.com
port: 16712
protocol: tls
Systemd service configuration: /etc/systemd/system/remote_syslog.service
[Unit]
Description=remote_syslog2
Documentation=https://github.com/papertrail/remote_syslog2
After=network-online.target
[Service]
ExecStartPre=/usr/bin/test -e /etc/log_files.yml
ExecStart=/usr/local/bin/remote_syslog -D
Restart=always
User=root
Group=root
[Install]
WantedBy=multi-user.target
Enable and start systemd service:
sudo systemctl enable remote_syslog.service
sudo systemctl start remote_syslog.service