Created
September 16, 2014 17:35
-
-
Save x684867/ab8c4341e408859569cc to your computer and use it in GitHub Desktop.
This gist contains a script to install papertrail...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # (c) 2014 EdgeCase, Inc. All Rights Reserved. | |
| # sam@edgecase.io | |
| # | |
| apt-get install rsyslog-gnutls -y | |
| cd /etc | |
| wget https://papertrailapp.com/tools/papertrail-bundle.pem | |
| cat > /etc/rsyslog.conf << EOF | |
| # /etc/rsyslog.conf Configuration file for rsyslog. | |
| # | |
| \$ModLoad imuxsock # provides support for local system logging | |
| \$ModLoad imklog # provides kernel logging support | |
| \$ModLoad imfile | |
| \$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat | |
| \$FileOwner root | |
| \$FileGroup adm | |
| \$FileCreateMode 0640 | |
| \$DirCreateMode 0755 | |
| \$Umask 0022 | |
| \$WorkDirectory /var/spool/rsyslog | |
| \$DefaultNetstreamDriverCAFile /etc/papertrail-bundle.pem # trust these CAs | |
| \$ActionSendStreamDriver gtls # use gtls netstream driver | |
| \$ActionSendStreamDriverMode 1 # require TLS | |
| \$ActionSendStreamDriverAuthMode x509/name # authenticate by hostname | |
| \$ActionSendStreamDriverPermittedPeer *.papertrailapp.com | |
| # | |
| # Add any custom text files here. | |
| # | |
| # | |
| *.* @@logs2.papertrailapp.com:38190 | |
| EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment