This article will help you get the Marathon plugin for sd-agent configured and returning metrics
Installing the marathon plugin package
Install the marathon plugin on Debian/Ubuntu:
sudo apt-get install sd-agent-marathon
Install the marathon plugin on RHEL/CentOS:
sudo yum install sd-agent-marathon
Read more about agent plugins.
Configuring the agent to monitor Marathon
1. Configure /etc/sd-agent/conf.d/marathon.yaml
init_config:
instances:
- url: the API endpoint of your Marathon master
- If you wish to specify an API timeout or use authentication to view the master info, amend the rest of the config file as necessary
2. Restart the agent
sudo /etc/init.d/sd-agent restart
or
sudo systemctl restart sd-agent
Verifying the configuration
Execute info to verify the configuration with the following:
sudo /etc/init.d/sd-agent info
or
/usr/share/python/sd-agent/agent.py info
If the agent has been configured correctly you'll see an output such as:
marathon ----- - instance #0 [OK] - Collected * metrics
You can also view the metrics returned with the following command:
sudo -u sd-agent /usr/share/python/sd-agent/agent.py check marathon
Configuring graphs
Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the marathon metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.
Monitored metrics
Metric | Values |
---|---|
marathon.apps Number of applications |
None / None Type: float |
marathon.backoffFactor Backoff time multiplication factor for each consecutive failed task launch; tagged by app_id and version |
None / None Type: float |
marathon.backoffSeconds Task backoff period; tagged by app_id and version |
second / None Type: float |
marathon.cpus Configured CPUs for each instance of a given application |
None / None Type: float |
marathon.deployments Number of running or pending deployments |
None / None Type: float |
marathon.disk Configured CPU for each instance of a given application |
mebibyte / None Type: float |
marathon.instances Number of instances of a given application; tagged by app_id and version |
None / None Type: float |
marathon.mem Configured memory for each instance of a given application; tagged by app_id and version |
mebibyte / None Type: float |
marathon.queue.size Number of apps waiting to be deployed |
None / None Type: float |
marathon.taskRateLimit The task rate limit for a given application; tagged by app_id and version |
None / None Type: float |
marathon.tasksHealthy Number of healthy tasks for a given application; tagged by app_id and version |
task / None Type: float |
marathon.tasksRunning Number of tasks running for a given application; tagged by app_id and version |
task / None Type: float |
marathon.tasksStaged Number of tasks staged for a given application; tagged by app_id and version |
task / None Type: float |
marathon.tasksUnhealthy Number of unhealthy tasks for a given application; tagged by app_id and version |
task / None Type: float |
Comments