-
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
Various minor fixes to elasticsearch/node_stats metricset x-pack code #8474
Merged
ycombinator
merged 5 commits into
elastic:master
from
ycombinator:metricbeat-elasticsearch-node-stats-fixes
Oct 1, 2018
Merged
Various minor fixes to elasticsearch/node_stats metricset x-pack code #8474
ycombinator
merged 5 commits into
elastic:master
from
ycombinator:metricbeat-elasticsearch-node-stats-fixes
Oct 1, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ycombinator
added
review
Metricbeat
Metricbeat
needs_backport
PR is waiting to be backported to other branches.
v7.0.0-alpha1
monitoring
v6.5.0
labels
Sep 27, 2018
ruflin
approved these changes
Oct 1, 2018
@@ -188,6 +160,12 @@ var ( | |||
}), | |||
}), | |||
} | |||
|
|||
threadPoolStatsSchema = s.Schema{ |
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.
Nice simplification.
@@ -204,13 +182,13 @@ func eventsMappingXPack(r mb.ReporterV2, m *MetricSet, content []byte) { | |||
// master node will not be accurate anymore as often in these cases a proxy is in front | |||
// of ES and it's not know if the request will be routed to the same node as before. | |||
for nodeID, node := range nodesStruct.Nodes { | |||
clusterID, err := elasticsearch.GetClusterID(m.HTTP, m.HostData().SanitizedURI, nodeID) | |||
clusterID, err := elasticsearch.GetClusterID(m.HTTP, m.HTTP.GetURI(), nodeID) |
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.
Would be nice to have CI detecting such issue in the future.
ycombinator
removed
the
needs_backport
PR is waiting to be backported to other branches.
label
Oct 1, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on recent testing I found a few issues in the
elasticsearch/nodes_stats
metricset's x-pack code path:The ES Node Stats API doesn't report load stats for 1m, 5m, and 15m until it has collected them. So we should make these fields optional in our schema.
The ES Node Stats API doesn't report cgroup stats unless ES is running in a container. So we should make this field optional in our schema.
The code was incorrectly double nesting the
license
field, that is"license": { "license": { ... } }
.The code was calling other ES APIs but not passing the correct reset URI to the functions making these API calls. As a result only one
node_stats
document would get indexed into.monitoring-es-6-mb-*
the first time the metricset'sFetch()
function. After that no newnode_stats
documents would get indexed because thecontent
received by theeventMappingXPack
function did not contain Node Stats API response data!This PR fixes these issues.