Mesos is a generic cluster resource manager which can be used together with the Marathon framework to run containers in distributed environments.
To monitor applications running in Mesos clusters, we recommend that you deploy OneAgent on all Mesos agent nodes by means of a Marathon application deployment. Following this, install OneAgent on the Mesos master nodes, as explained on this page.
Locate your OneAgent installer URL
The first step is to obtain the location for ONEAGENT_INSTALLER_SCRIPT_URL. This information is presented to you during OneAgent installation.
To get your ONEAGENT_INSTALLER_SCRIPT_URL
wget commandThis is the URL:
arch parameter with <arch>. Ignore the flavor=default parameter.API-Token value, you need a PaaS token.Your URL should look like this: https://host.domain.com/api/v1/deployment/installer/agent/unix/default/latest?arch=<arch>
This is your ONEAGENT_INSTALLER_SCRIPT_URL.
This your URL and API token.

Append the API token to the URL using the API-Token parameter. Your URL should look like this:
https://host.domain.com/api/v1/deployment/installer/agent/unix/default/latest?arch=x86&flavor=default&Api-Token=<token>
This is your ONEAGENT_INSTALLER_SCRIPT_URL.
1.If you're using DC/OS to manage your Mesos cluster, you can take advantage of the DESK package in the DC/OS universe. The universe package will automatically deploy DESK to all your Mesos agent nodes.
2.Deploy OneAgent on Mesos master nodes.
Marathon doesn't allow you to deploy applications to master nodes (except for nodes that are tagged as both master and agent). This is why you must manually install OneAgent on all Mesos master nodes that aren't additionally configured as Mesos agents. For this, use the default Linux installer.
If you're not using DC/OS, you can run OneAgent as a Marathon application by following this example.
cat command to create the desk-oneagent.json file. Before you run it, edit the JSON part from the example below and replace the two placeholders with your Mesos cluster specific data:REPLACE_WITH_YOUR_URL is the location for ONEAGENT_INSTALLER_SCRIPT_URL you determined earlier.REPLACE_WITH_NUMBER_OF_NODES is the integer representing the number of nodes in your Mesos cluster.cat <<- EOF > desk-oneagent.json
{
"id": "desk-oneagent",
"cpus": 0.1,
"mem": 256,
"instances": REPLACE_WITH_NUMBER_OF_NODES,
"constraints": [["hostname", "UNIQUE"], ["hostname", "GROUP_BY"]],
"container": {
"type": "DOCKER",
"volumes": [
{
"containerPath": "/mnt/root",
"hostPath": "/",
"mode": "RW"
}
],
"docker": {
"image": "desk/oneagent",
"forcePullImage": true,
"network": "HOST",
"privileged": true,
"parameters": [
{ "key": "pid", "value": "host" },
{ "key": "ipc", "value": "host" },
{ "key": "env", "value": "ONEAGENT_INSTALLER_SCRIPT_URL=REPLACE_WITH_YOUR_URL" },
{ "key": "env", "value": "ONEAGENT_INSTALLER_SKIP_CERT_CHECK=false "}
]
}
},
"args": [
]
}
EOF
Copy
desk-oneagent.json file, send an HTTP POST request to the Mesos master leader to deploy the Marathon application with OneAgent.curl -X POST -H "Content-Type: application/json" http://your-mesos-master:8080/v2/apps -d@desk-oneagent.json
Copy
Marathon doesn't allow you to deploy applications to master nodes (except for nodes that are tagged as both master and agent). This is why you must manually install OneAgent on all Mesos master nodes that aren't additionally configured as Mesos agents. For this, use the default Linux installer.