Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic monitoring support for Apache Mesos #919

Merged
merged 3 commits into from May 5, 2014

Conversation

graemej
Copy link
Contributor

@graemej graemej commented Apr 28, 2014

This is a basic agent check for Apache Mesos that consumes Mesos REST API endpoints and emits Datadog metrics. We've been using this code successfully with the latest Mesos 0.18.0 release and it's proved sufficient to build some useful dashboards.

Mesos currently provides statistics from three endpoints which are translated into Datadog metrics:

Hopefully others running Mesos will find this useful.

@clofresh
Copy link
Contributor

Thanks for the great PR ! We will review and test on our end 🍖

@graemej
Copy link
Contributor Author

graemej commented Apr 29, 2014

fyi: if you're trying to setup up a test environment this may help: https://github.com/everpeace/vagrant-mesos

class Mesos(AgentCheck):
def check(self, instance):
if 'url' not in instance:
self.log.info("Skipping instance, no url found.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you raise an Exception here instead ? The exception would then appear in the info page.

response = self.get_master_stats(url, timeout)
if response is not None:
for key in iter(response):
self.gauge('mesos.stats.' + key, response[key], tags=['mesos'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this tag will be useful, do you have a use case for it ?

Also could you add support for custom tags (that would be defined in the yaml file) as we do in some other checks ?

Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I'll take a peek at the custom tags tomorrow and dispense with the 'mesos' tag.

clofresh added a commit that referenced this pull request May 5, 2014
Basic monitoring support for Apache Mesos
@clofresh clofresh merged commit 987ebc6 into DataDog:master May 5, 2014
@clofresh
Copy link
Contributor

clofresh commented May 5, 2014

great, thanks! 💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants