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

[Mesos Slave] Check available metrics for backwards compatibility #1066

Merged
merged 6 commits into from
Jan 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions mesos_slave/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG - mesos_slave

1.1.1 / Unreleased
==================

### Changes

* [BUGFIX] Checks available metrics for backwards compatibility. See [#1066][].

1.1.0 / 2017-08-21
==================

Expand All @@ -13,3 +20,6 @@
### Changes

* [FEATURE] adds mesos_slave integration.

<!--- The following link definition list is generated by PimpMyChangelog --->
[#1066]: https://github.com/DataDog/integrations-core/issues/1066
2 changes: 1 addition & 1 deletion mesos_slave/datadog_checks/mesos_slave/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

MesosSlave = mesos_slave.MesosSlave

__version__ = "1.1.0"
__version__ = "1.1.1"

__all__ = ['mesos_slave']
9 changes: 5 additions & 4 deletions mesos_slave/datadog_checks/mesos_slave/mesos_slave.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ class MesosSlave(AgentCheck):
'slave/cpus_percent' : ('mesos.slave.cpus_percent', GAUGE),
'slave/cpus_total' : ('mesos.slave.cpus_total', GAUGE),
'slave/cpus_used' : ('mesos.slave.cpus_used', GAUGE),
'slave/gpus_percent' : ('mesos.slave.gpus_percent', GAUGE),
'slave/gpus_total' : ('mesos.slave.gpus_total', GAUGE),
'slave/gpus_used' : ('mesos.slave.gpus_used', GAUGE),
'slave/gpus_percent' : ('mesos.slave.gpus_percent', GAUGE), # >= 1.0.0
'slave/gpus_total' : ('mesos.slave.gpus_total', GAUGE), # >= 1.0.0
'slave/gpus_used' : ('mesos.slave.gpus_used', GAUGE), # >= 1.0.0
'slave/disk_percent' : ('mesos.slave.disk_percent', GAUGE),
'slave/disk_total' : ('mesos.slave.disk_total', GAUGE),
'slave/disk_used' : ('mesos.slave.disk_used', GAUGE),
Expand Down Expand Up @@ -208,6 +208,7 @@ def check(self, instance):
self.SLAVE_EXECUTORS_METRICS, self.STATS_METRICS]
for m in metrics:
for key_name, (metric_name, metric_func) in m.iteritems():
metric_func(self, metric_name, stats_metrics[key_name], tags=tags)
if key_name in stats_metrics:
metric_func(self, metric_name, stats_metrics[key_name], tags=tags)

self.service_check_needed = True
2 changes: 1 addition & 1 deletion mesos_slave/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"linux",
"mac_os"
],
"version": "1.1.0",
"version": "1.1.1",
"guid": "14d0267e-9989-4d09-8362-9319958e858e",
"public_title": "Datadog-Mesos Slave Integration",
"categories":["configuration & deployment", "containers", "orchestration"],
Expand Down