-
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
elasticsearch module - xpack enabled parity #29548
elasticsearch module - xpack enabled parity #29548
Conversation
Pinging @elastic/integrations (Team:Integrations) |
Pinging @elastic/stack-monitoring (Stack monitoring) |
} | ||
if err := base.Module().UnpackConfig(&config); err != nil { | ||
return nil, err | ||
} | ||
|
||
localRecoveryPath := recoveryPath | ||
if config.ActiveOnly { | ||
if !config.XPack && config.ActiveOnly { |
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.
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.
I think that unless something is specifically broken, we shouldn't need to add this check back.
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.
Are we fine flipping the ActiveOnly
default to false
then ?
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.
Yes because the xpack
flag will eventually dissapear. But users must still explicitly check to true
in the case of active_only
.
@@ -81,7 +81,6 @@ func eventsMapping(r mb.ReporterV2, info elasticsearch.Info, content []byte, isX | |||
event.ModuleFields = common.MapStr{} | |||
event.ModuleFields.Put("cluster.name", info.ClusterName) | |||
event.ModuleFields.Put("cluster.id", info.ClusterID) | |||
event.ModuleFields.Put("node.id", info.Name) |
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.
The problem here is that we set the name instead of ID which breaks some href
in the UI because we usually redirect with the ID. 7.16 didn't have this property set at all so removing it from now but we should populate the node
property correctly.
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.
I don't see any reason to remove it. I actually don't remember why I added it but we can always cycle if necessary.
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.
Removed it because we write a name where the consumer of these documents expect an ID. It currently breaks the stack monitoring UI because we build a link out of this ID to redirect to the node's details page, and the redirection fails since we can't find the node details from its name.
Can we push this and follow up with the appropriate fix that would populate the node.id
and name
?
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.
Populated the node object by parsing the ml_job
response.
The conditional is there because the property is only available for opened jobs
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.
Sorry, I meant to not remove it. I forgot the "not" 😅
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
@@ -81,7 +81,6 @@ func eventsMapping(r mb.ReporterV2, info elasticsearch.Info, content []byte, isX | |||
event.ModuleFields = common.MapStr{} | |||
event.ModuleFields.Put("cluster.name", info.ClusterName) | |||
event.ModuleFields.Put("cluster.id", info.ClusterID) | |||
event.ModuleFields.Put("node.id", info.Name) |
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.
Sorry, I meant to not remove it. I forgot the "not" 😅
@@ -72,7 +72,7 @@ func eventsMapping(r mb.ReporterV2, content []byte, isXpack bool) error { | |||
ModuleFields: common.MapStr{}, | |||
} | |||
|
|||
event.ModuleFields.Put("cluster.state.id", stateData.StateID) | |||
event.ModuleFields.Put("cluster.stats.state.state_uuid", stateData.StateID) |
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.
This is breaking change at the moment. Instead of removing the old field, add a new one duplicating the value of the current one.
At the same time, we need to add this new field in the corresponding fields.yml
, this one: https://github.com/elastic/beats/blob/master/metricbeat/module/elasticsearch/cluster_stats/_meta/fields.yml
The run a mage fmt update
at the root of metricbeat folder and you'll see a bunch of files changed.
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.
Isn't this field already defined or am I looking at wrong place ?
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.
It is already defined, yes. But that just mean "index it" maybe it was a leftover and we finally don't write into that field in the module.
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.
LGTM
* elasticsearch module - xpack enabled parity * flip ActiveOnly default * add ml_job's node * lint * update shard cluster's state path * add back state.id to prevent breaking changes (cherry picked from commit 0bfa0a1)
* elasticsearch module - xpack enabled parity * flip ActiveOnly default * add ml_job's node * lint * update shard cluster's state path * add back state.id to prevent breaking changes (cherry picked from commit 0bfa0a1) Co-authored-by: Kevin Lacabane <[email protected]>
Summary
xpack.enabled
is set.node
property forml_job
andshard
metricsets