papertrail

Papertrailを使ってみる

More than 1 year has passed since last update.

試した環境

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="17.04 (Zesty Zapus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 17.04"
VERSION_ID="17.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=zesty
UBUNTU_CODENAME=zesty

Papertrail

https://papertrailapp.com/

# 自動でSystem/OSログ関連がセットアップされます
$ wget -qO - --header="X-Papertrail-Token: xxxxxxxxxxxxxxx" \
https://papertrailapp.com/destinations/xxxxxxx/setup.sh | sudo bash

# 以下の手順で手動でログを登録できる
# https://github.com/papertrail/remote_syslog2/releases/tag/v0.19
$ wget https://github.com/papertrail/remote_syslog2/releases/download/v0.19/remote-syslog2_0.19_amd64.deb
$ dpkg -i remote-syslog2_0.19_amd64.deb
$ sudo remote_syslog -p {YOUR_PORT} -d {YOUR_DOMAIN} --pid-file=/var/run/remote_syslog.pid /path/to/access_log