-
-
Save torifat/51eeb502a943900ad46dc2c08f91354a 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