Skip to content

Instantly share code, notes, and snippets.

@megastef
Created December 22, 2015 12:48
Show Gist options
  • Save megastef/2380335aad6ab7e162e8 to your computer and use it in GitHub Desktop.
Save megastef/2380335aad6ab7e162e8 to your computer and use it in GitHub Desktop.
Monitor Apache Mesos Docker Containers / deploy to each node / get all logs and metrics
curl -XPOST -H "Content-type: application/json" http://your_marathon_server:8080/v2/apps -d '
{
"container": {
"type": "DOCKER",
"docker": {
"image": "sematext/sematext-agent-docker"
},
"volumes": [
{
"containerPath": "/var/run/docker.sock",
"hostPath": "/var/run/docker.sock",
"mode": "RW"
}
],
"network": "BRIDGE"
},
"env": {
"LOGSENE_TOKEN": "YOUR_LOGSENE_TOKEN",
"SPM_TOKEN": "YOUR_SPM_TOKEN"
},
"id": "sematext-agent",
"instances": 1,
"cpus": 0.1,
"mem": 100,
"constraints": [
[
"hostname",
"UNIQUE"
]
]
}
@megastef
Copy link
Author

megastef commented Jan 7, 2016

"instances": 1, // should be number of mesos nodes ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment