amazon web services - How to auto create new hosts in Logentries for AWS EC2 autoscaling group -


what's best way send logs auto scaling groups (of ec2) logentries.

i used ec2 platform create ec2 log monitoring of ec2 instances created autoscaling group. according autoscaling rules, new instance spin if current 1 destroyed.

now how create automation logentries create new hosts , starting getting logs. i've read https://logentries.com/doc/linux-agent-with-chef/#updating-le-agent i'm stuck @ override['le']['pull-server-side-config'] = false since don't know chef (i took training site)

for autoscaling group, need baked ami, or scripted run on startup. can ec2 instance run commands on startup, after you've figured out script run.

the logentries linux agent installation docs has setup instructions amazon ami (under installation > select distro below > amazon ami).

run following commands 1 one in terminal:

you need provide logentries credentials link agent account.

sudo -s tee /etc/yum.repos.d/logentries.repo <<eof [logentries] name=logentries repo enabled=1 metadata_expire=1d baseurl=http://rep.logentries.com/amazon\$releasever/\$basearch gpgkey=http://rep.logentries.com/rpm-gpg-key-logentries eof yum update yum install logentries le register yum install logentries-daemon 

i recommend trying script once , seeing if works you, include in user data autoscaling launch configuration.


Comments