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

Move elasticsearch node_stats metricset under node.stats namespace #4142

Merged
merged 1 commit into from May 9, 2017

Conversation

Projects
None yet
2 participants
@ruflin
Copy link
Collaborator

commented Apr 28, 2017

So far the node_stats was putting all its data under elasticsearch.node_stats.*. This was changed to elasticsearch.node.stats.*.

Further changes:

  • Remove support for setting index in metricset. This was never used and can now be done through using format string in the index setting.
  • Remove support for setting type in metricset. Type will be removed in elasticsearch.
  • Rename ModuleData constant to ModuleDataKey.
  • Introduce NamespaceKey as constant to replace hardcoded _namespace.
  • Cleanup event generation for metricbeat.
  • Remove type from event as not needed.
@@ -68,37 +59,32 @@ func (b EventBuilder) Build() (common.MapStr, error) {
if n, ok := event["_namespace"]; ok {
delete(event, "_namespace")
namespace = n.(string)

This comment has been minimized.

Copy link
@andrewkroh

andrewkroh May 1, 2017

Member

Just to be safe, this should check the boolean that is returned that indicates the success of the type assertion.

This comment has been minimized.

Copy link
@ruflin

ruflin May 3, 2017

Author Collaborator

added

// In case meta data exists, it is added on the module level
// This is mostly used for shared fields across multiple metricsets in one module
if moudleDataExists {
if _, ok := moduleData.(common.MapStr); ok {

This comment has been minimized.

Copy link
@andrewkroh

andrewkroh May 1, 2017

Member

Instead of ignoring the result of the type assertion with an assignment to _, we could use the value in the following expression instead of doing a second type assertion.

This comment has been minimized.

Copy link
@ruflin

ruflin May 3, 2017

Author Collaborator

changed

@ruflin ruflin force-pushed the ruflin:node.stats branch 3 times, most recently from d4ed150 to 5ba5dad May 4, 2017

Move elasticsearch node_stats metricset under node.stats namespace
So far the node_stats was putting all its data under `elasticsearch.node_stats.*`. This was changed to `elasticsearch.node.stats.*`.

Further changes:

* Remove support for setting index in metricset. This was never used and can now be done through using format string in the index setting.
* Remove support for setting type in metricset. Type will be removed in elasticsearch.
* Rename ModuleData constant to ModuleDataKey.
* Introduce NamespaceKey as constant to replace hardcoded `_namespace`.
* Cleanup event generation for metricbeat.
* Remove `type` from event as not needed and remove it as required field.

@ruflin ruflin force-pushed the ruflin:node.stats branch from 5ba5dad to 7fb911e May 9, 2017

@ruflin

This comment has been minimized.

Copy link
Collaborator Author

commented May 9, 2017

jenkins, retest it

@andrewkroh andrewkroh merged commit 4ff772d into elastic:master May 9, 2017

6 checks passed

CLA Commit author has signed the CLA
Details
codecov/patch 90.24% of diff hit (target 62.98%)
Details
codecov/project 62.99% (+<.01%) compared to ba1288d
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
default Build finished.
Details

@ruflin ruflin deleted the ruflin:node.stats branch May 9, 2017

ramon-garcia added a commit to ramon-garcia/beats that referenced this pull request Dec 5, 2017

Move elasticsearch node_stats metricset under node.stats namespace (e…
…lastic#4142)

So far the node_stats was putting all its data under `elasticsearch.node_stats.*`. This was changed to `elasticsearch.node.stats.*`.

Further changes:

* Remove support for setting index in metricset. This was never used and can now be done through using format string in the index setting.
* Remove support for setting type in metricset. Type will be removed in elasticsearch.
* Rename ModuleData constant to ModuleDataKey.
* Introduce NamespaceKey as constant to replace hardcoded `_namespace`.
* Cleanup event generation for metricbeat.
* Remove `type` from event as not needed and remove it as required field.

athom added a commit to athom/beats that referenced this pull request Jan 25, 2018

Move elasticsearch node_stats metricset under node.stats namespace (e…
…lastic#4142)

So far the node_stats was putting all its data under `elasticsearch.node_stats.*`. This was changed to `elasticsearch.node.stats.*`.

Further changes:

* Remove support for setting index in metricset. This was never used and can now be done through using format string in the index setting.
* Remove support for setting type in metricset. Type will be removed in elasticsearch.
* Rename ModuleData constant to ModuleDataKey.
* Introduce NamespaceKey as constant to replace hardcoded `_namespace`.
* Cleanup event generation for metricbeat.
* Remove `type` from event as not needed and remove it as required field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.