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

Do not send Metricset values which were not set #1972

Closed
ruflin opened this issue Jul 6, 2016 · 0 comments
Closed

Do not send Metricset values which were not set #1972

ruflin opened this issue Jul 6, 2016 · 0 comments
Assignees
Labels
Metricbeat Metricbeat

Comments

@ruflin
Copy link
Contributor

ruflin commented Jul 6, 2016

Currently most metricsets send a default value in case a value is not set. In contrast the mongodb/status metricset removes all fields which are not set. An example can be found here https://github.com/elastic/beats/blob/master/metricbeat/module/mongodb/status/data.go#L175

The MongoDB implementation has the following advantage:

  • Default values can be misleading as they can conflict with the actual values sent (0 can have 2 meanings)
  • It makes the metricsets more cross version compatible with services. So if an older service does not contain the value, it is just not sent.

All Metricsets should have the same implementation as MongoDB has. The logic in MongoDB to remove fields should be generalised.

@tsg tsg self-assigned this Jul 13, 2016
tsg pushed a commit to tsg/beats that referenced this issue Jul 14, 2016
It used to be that we were sending zero values (e.g. "" for string, 0 for int)
in case of errors getting a particular value.

Fixes elastic#1972.
tsg pushed a commit to tsg/beats that referenced this issue Jul 14, 2016
This is an alternative implementation of elastic#2032. Instead of collecting the errors
and then removing the empty values, we define a schema of conversions and we use code
apply them, so we have the opportunity to handle errors.

Fixes elastic#1972.
urso pushed a commit that referenced this issue Jul 15, 2016
This is an alternative implementation of #2032. Instead of collecting the errors
and then removing the empty values, we define a schema of conversions and we use code
apply them, so we have the opportunity to handle errors.

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

No branches or pull requests

2 participants