Last active
May 11, 2017 04:03
-
-
Save avnersorek/498a894160cb1e425227 to your computer and use it in GitHub Desktop.
AWS Elastic Beanstalk configuration script for forwarding logs to LogDNA
This file contains 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
# Place this file in the .ebextensions folder of your project | |
files: | |
"/home/ec2-user/logdna.sh" : | |
mode: "000777" | |
owner: root | |
group: root | |
content: | | |
#!/bin/sh | |
echo "[logdna] | |
name=LogDNA packages | |
baseurl=http://repo.logdna.com/el6/ | |
enabled=1 | |
gpgcheck=0" | tee /etc/yum.repos.d/logdna.repo | |
yum -y install logdna-agent | |
logdna-agent -k ### LogDNA-API-KEY ### | |
# /var/log is monitored/added by default (recursively), optionally specify more folders here | |
logdna-agent -d /var/log/nodejs/nodejs.log | |
chkconfig logdna-agent on | |
service logdna-agent start | |
commands: | |
logdna: | |
command: "/home/ec2-user/logdna.sh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, great job with the script !!
i would like to know how can i exclude some logs. With -d param i can add an specific file to watch but i would like to stop seeing som files.
hope that u can help me !
Thanks !