-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Metricbeat] Migrate ceph to reporter V2 with error handling #11979
[Metricbeat] Migrate ceph to reporter V2 with error handling #11979
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making linters happier!
pgStateInfo = events[4].MetricSetFields["pg_state"].(common.MapStr) | ||
assert.EqualValues(t, "active+undersized+degraded+remapped", pgStateInfo["state_name"]) | ||
assert.EqualValues(t, 55, pgStateInfo["count"]) | ||
assert.EqualValues(t, 813, pgStateInfo["version"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
jenkins, test this |
m.Logger().Error(err) | ||
reporter.Error(err) | ||
return | ||
return errors.Wrap(err, "error in mapping") | ||
} | ||
|
||
for _, event := range events { | ||
reporter.Event(mb.Event{MetricSetFields: event}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add if !reported { return nil }
check to be consistent with https://github.com/elastic/beats/pull/11979/files#diff-dc97d499b303003462f444c7164c2780R78?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the change!
see #11374
This one is a tad large, as I took the time to add comments and change variable names in order to make the linters happy.