Skip to content

Instantly share code, notes, and snippets.

@serek
Last active April 5, 2017 15:12
Show Gist options
  • Save serek/52370dfa277cb58955223500f2d1361b to your computer and use it in GitHub Desktop.
Save serek/52370dfa277cb58955223500f2d1361b to your computer and use it in GitHub Desktop.
scalyr ebextension for docker logs or any (put these files into .ebextensions folder)
packages:
yum:
python26: []
packages:
rpm:
"scalyr-agent-2": https://www.scalyr.com/scalyr-repo/stable/latest/scalyr-agent-2-2.0.21-1.noarch.rpm
services:
sysvinit:
scalyr-agent-2:
enabled: true
ensureRunning: true
files:
- /etc/scalyr-agent-2/agent.json
files:
"/etc/scalyr-agent-2/agent.json":
mode: "000755"
owner: root
group: root
content: |
{
"api_key": "xxx",
"logs": [
{
"path": "/var/log/eb-docker/containers/eb-current-app/*-stdouterr.log",
"attributes":{"parser":"ebDockerStdOutErr" }
},
{
"path": "/var/log/eb-activity.log",
"attributes":{"parser":"ebActivity" }
},
{
"path": "/var/log/nginx/access.log",
"attributes":{"parser":"accessLog" }
},
{
"path": "/var/log/nginx/error.log",
"attributes":{"parser":"nginxErrorLog" }
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment