-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Monitoring] Remove dependency on source_node.uuid #23721
Changes from all commits
cef6db1
bceb261
069bbe9
5ff0a52
d68f712
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,22 +20,22 @@ export function mapNodesInfo(nodeHits, clusterStats, shardStats) { | |
const clusterState = get(clusterStats, 'cluster_state', { nodes: {} }); | ||
|
||
return nodeHits.reduce((prev, node) => { | ||
const sourceNode = get(node, '_source.source_node'); | ||
const sourceNode = get(node, '_source.node_stats'); | ||
|
||
const calculatedNodeType = calculateNodeType(sourceNode, get(clusterState, 'master_node')); | ||
const { nodeType, nodeTypeLabel, nodeTypeClass } = getNodeTypeClassLabel(sourceNode, calculatedNodeType); | ||
const isOnline = !isUndefined(get(clusterState, [ 'nodes', sourceNode.uuid ])); | ||
const isOnline = !isUndefined(get(clusterState, [ 'nodes', sourceNode.node_id ])); | ||
|
||
return { | ||
...prev, | ||
[sourceNode.uuid]: { | ||
name: sourceNode.name, | ||
[sourceNode.node_id]: { | ||
name: sourceNode.node_id, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pinging @ycombinator. Do we have a replacement plan for this? I can't remember from our earlier discussions, but are we able to inject the node's |
||
transport_address: sourceNode.transport_address, | ||
type: nodeType, | ||
isOnline, | ||
nodeTypeLabel: nodeTypeLabel, | ||
nodeTypeClass: nodeTypeClass, | ||
shardCount: get(shardStats, `nodes[${sourceNode.uuid}].shardCount`, 0), | ||
shardCount: get(shardStats, `nodes[${sourceNode.node_id}].shardCount`, 0), | ||
} | ||
}; | ||
}, {}); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,10 +31,10 @@ export function getShardAggs(config, includeNodes) { | |
aggs: { | ||
index_count: { cardinality: { field: 'shard.index' } }, | ||
node_names: { | ||
terms: { field: 'source_node.name', size: aggSize } | ||
terms: { field: 'node_stats.name', size: aggSize } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This field doesn't seem to exist so this won't work |
||
}, | ||
node_ids: { | ||
terms: { field: 'source_node.uuid', size: 1 } // node can only have 1 id | ||
terms: { field: 'shard.node', size: 1 } // node can only have 1 id | ||
} | ||
} | ||
}; | ||
|
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.
We need to either implicitly figure this out or explicitly require it for each metric. It's an issue once this is fixed