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

[Metricbeat] Migrate ceph to reporter V2 with error handling #11979

Conversation

fearful-symmetry
Copy link
Contributor

@fearful-symmetry fearful-symmetry commented Apr 29, 2019

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.

@fearful-symmetry fearful-symmetry added Metricbeat Metricbeat Team:Integrations Label for the Integrations team technical_debt labels Apr 29, 2019
@fearful-symmetry fearful-symmetry requested a review from a team April 29, 2019 15:53
@fearful-symmetry fearful-symmetry self-assigned this Apr 29, 2019
Copy link
Member

@jsoriano jsoriano left a 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!

metricbeat/module/ceph/cluster_health/cluster_health.go Outdated Show resolved Hide resolved
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"])
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

metricbeat/module/ceph/cluster_health/data.go Outdated Show resolved Hide resolved
metricbeat/module/ceph/cluster_status/cluster_status.go Outdated Show resolved Hide resolved
metricbeat/module/ceph/osd_df/osd_df.go Outdated Show resolved Hide resolved
metricbeat/module/ceph/osd_tree/osd_tree.go Outdated Show resolved Hide resolved
metricbeat/module/ceph/pool_disk/pool_disk.go Outdated Show resolved Hide resolved
@fearful-symmetry
Copy link
Contributor Author

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})
Copy link
Contributor

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?

Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a 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!

@fearful-symmetry fearful-symmetry merged commit 0a2ae60 into elastic:master May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Metricbeat Metricbeat Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants