An exporter for generating marathon applications related metrics.
If you are using Prometheus and you want to collect your marathon applications metrics. For example how many instances / cpus / memory that used by an application, if an application is healthy running for serving users need. Then this exporter is exactly designed for you.
Currently, it exports those marathon application metrics.
- instances
- cpus
- mem
- tasksStaged
- tasksRunning
- tasksHealthy
- tasksUnhealthy
After you integrate it with your Prometheus. You will able to query marathon applications historical data like
marathon_app_tasksHealthy{id="/your/application/id"}
or
marathon_app_instances{id="/your/application/id"} * marathon_app_mem{id="/your/application/id"}
And you will be able to integrate it with your Grafana to create useful charts or alerts.
Run docker run -p 3000:3000 factual/marathon-apps-exporter
Manually you can visit http://localhost:3000/metrics?marathon-url=http://your.marathon.url to see the generated metrics.
If you want to integrate it with your prometheus. You can append this to your prometheus config:
- job_name: 'marathon-apps'
params:
marathon-url:
- http://your.marathon.url
static_configs:
- targets: ['localhost:3000'] # this exporter's host and port
- Pull down the latest code
git clone https://github.com/factual/marathon-apps-exporter.git
- Build docker image by yourself or Pull down the latest image from docker hub.
cd marathon-apps-exporter
# if you want to build image by yourself
docker-compose build
# if you want to just pull down the latest image
docker-compose pull
-
Develop workflow
-
Start dev docker container.
docker-compose run --service-ports marathon-apps-exporter bash
This command will help you launch a docker container and start a shell(bash). You can type any command you want in it.
-
Edit source code in your host machine with your favorite editor.
-
Run
npm start
in side the dev docker container's shell. -
Test your changes in http://localhost:3000.
-
At the end, please try to rebuild the docker image locally to make sure it can finish successfully.
-
Bug reports and pull requests are welcome on GitHub at https://github.com/factual/marathon-apps-exporter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the factual marathon-apps-export project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.