For amazon linux. Inspiration from https://github.com/drakerlabs/opsworks_sidekiq
In stack settings set custom json like so:
"logentries": {
"userkey": "[YOUR USER KEY]",
"hostname": "[SOME NAME FOR SERVER]",
"files": [
"[/PATH/TO/FILE1]",
"[/PATH/TO/FILE2]",
"[/PATH/TO/FILE3]",
....
]
}
This cookbook's broken into two recipes:
logentries::default
installs the logentries agent using theuserkey
andhostname
specified in the custom jsonlogentries::follow
follows the files specified in the custom jsonfiles
array
Under your Layer settings you'll want to add logentries::default
to the Setup or Configure lifecycle event and logentries::follow
to the Deploy event.