Closed ghost closed 8 years ago
Started a branch where we can start working on this: https://github.com/intelsdi-x/snap-plugin-collector-mesos/tree/get-features. I'll be traveling for the next few days, so chances are I won't have a chance to get to this until later next week.
Such "discovery" mechanism would need to be implemented in GetMetricTypes
. I have started discussion on configuration items in GetMetricTypes
recently. If there would be consensus to go down that path, I think we would need to find a way to handle the case this enhancement describes differently. Please take a look at Snap#936 and share your thought on that.
My point of view is, that there will be "exceptions" which will require some kind of discovery mechanism at early stage, but most of the plugins should work without it.
Thanks @marcin-krolik, I'll comment on the Snap proposal. I'm going to continue down this path for now and open a PR, and we can revisit later if needed.
This was resolved in #20.
Currently, this Snap plugin running on a Mesos agent will produce metric types for all known metrics in the protobuf, regardless of whether or not the agent is actually capable of producing those metrics. Up to this point, we expected the user to not attempt to collect metrics for features that aren't enabled, but this is fragile and surprising to the user; for example, the following
net_
metrics are returned bysnapctl metric list
despite the network isolator not being enabled:Because these metrics are available in Snap's metrics catalog, a user can successfully load a task that attempts to do the following:
The task will start successfully, but will eventually be disabled. The logs produce the following message:
I have an outstanding TODO item to implement this here: https://github.com/intelsdi-x/snap-plugin-collector-mesos/blob/af87431dbbd225e5d4f8ebbaedec25b995911ff2/mesos/agent/agent.go#L86-L87
The configuration flags for a given agent can be determined like so:
In this particular case,
net_
metrics shouldn't be collected becausenetwork/port_mapping
isn't listed in theisolation
key. There are additional cases that need to be considered, such asperf_events
, etc.