Created
December 4, 2018 11:11
-
-
Save Jolg42/6f1a7cc0478c945f245982172919e1df to your computer and use it in GitHub Desktop.
00_logdna.config
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
files: | |
"/home/ec2-user/logdna.sh" : | |
mode: "000777" | |
owner: root | |
group: root | |
content: | | |
#!/bin/sh | |
rpm --import https://repo.logdna.com/logdna.gpg | |
echo "[logdna] | |
name=LogDNA packages | |
baseurl=https://repo.logdna.com/el6/ | |
enabled=1 | |
gpgcheck=1 | |
gpgkey=https://repo.logdna.com/logdna.gpg" | sudo tee /etc/yum.repos.d/logdna.repo | |
yum -y install logdna-agent | |
logdna-agent -k <KEY> # this is your unique Ingestion Key | |
# /var/log is monitored/added by default (recursively), optionally add more dirs here | |
logdna-agent -d /var/app/current/logs | |
logdna-agent --hostname `{"Ref": "AWSEBEnvironmentName" }` | |
logdna-agent -t `{"Ref": "AWSEBEnvironmentName" }` | |
chkconfig logdna-agent on | |
service logdna-agent start | |
commands: | |
01_install_logdna: | |
command: "/home/ec2-user/logdna.sh" | |
02_restart_logdna: | |
command: "service logdna-agent restart" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment