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

Add xpack data structure for Elasticsearch index_summary metricset #7102

Merged
merged 2 commits into from
May 24, 2018

Conversation

ruflin
Copy link
Member

@ruflin ruflin commented May 15, 2018

No description provided.

@ruflin ruflin added in progress Pull request is currently in progress. module Metricbeat Metricbeat labels May 15, 2018
@@ -0,0 +1,99 @@
package index_summary

Choose a reason for hiding this comment

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

don't use an underscore in package name

Copy link
Member

Choose a reason for hiding this comment

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

Can we configure hound rules to ignore this? :D

Copy link
Member Author

Choose a reason for hiding this comment

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

Would be nice. Not sure how hound exaclty works / is configured TBH ;-)

Copy link
Member

Choose a reason for hiding this comment

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

I think this cannot be configured 😕 reasons: golang/lint#209

@ruflin ruflin force-pushed the xpack_indices_stats branch 2 times, most recently from 7622e1d to ee0e680 Compare May 18, 2018 08:16
* Add ID to node info and make an empty node ID possible
@ruflin ruflin added review and removed in progress Pull request is currently in progress. labels May 22, 2018
@ruflin ruflin requested a review from jsoriano May 22, 2018 21:05
event.RootFields.Put("type", "indices_stats")
event.RootFields.Put("source_node", sourceNode)

event.Index = ".monitoring-es-6-mb"
Copy link
Member

Choose a reason for hiding this comment

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

This 6 is related to the version? Could we extract it from somewhere else so we don't forget to update it in 7.0? :)

Copy link
Member Author

Choose a reason for hiding this comment

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

This is only temporary and is the same across all metricsets for now. We have to come up with something better in the long run. Would keep it for now.

Copy link
Member

Choose a reason for hiding this comment

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

Ok

event.RootFields.Put("indices_stats._all", fields)
event.RootFields.Put("cluser_uuid", info.ClusterID)
event.RootFields.Put("timestamp", common.Time(time.Now()))
event.RootFields.Put("interval_ms", m.Module().Config().Period.Nanoseconds()/1000/1000)
Copy link
Member

Choose a reason for hiding this comment

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

m.Module().Config().Period/time.Millisecond

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

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.

LGTM

@jsoriano jsoriano merged commit 3e90d65 into elastic:master May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants