-
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
Index cluster.id and cluster.name in elasticsearch/ml_job metricset #9165
Index cluster.id and cluster.name in elasticsearch/ml_job metricset #9165
Conversation
|
||
// +build !integration | ||
|
||
package ml_job |
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.
don't use an underscore in package 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.
As mentioned in other PR's, worth adding a changelog I think.
General note: Right now the code is in each metricset which is ok. To simplify the code perhaps have something like
func enrichEvent(info elasticsearch.Info, event beat.Event) beat.Event { ... }
Like this it would be only 1 line in each metricset and if we decide to add more general fields in the future we can do it in one place. That is basically what I meant in the past with a "processor".
I think in general yes but these fields (cluster_uuid and cluster_name) were a miss. They should've been there to begin with because some other metricsets in this module have them but some don't. I say we add CHANGELOG entries for new fields once the module goes GA?
Ah yes, I totally forgot about this idea 🤦♂️. Will refactor all of these in a follow up PR! |
…csearch/ml_job metricset (#9173) * Index cluster.id and cluster.name in elasticsearch/ml_job metricset (#9165) This PR teaches the `elasticsearch/ml_job` metricset to index the Elasticsearch `cluster_uuid` and `cluster_name` as the module-level `cluster.id` and `cluster.name` fields, respectively. (cherry picked from commit e7f4a1c) * Fixing field name for 6.x
This PR teaches the
elasticsearch/ml_job
metricset to index the Elasticsearchcluster_uuid
andcluster_name
as the module-levelcluster.id
andcluster.name
fields, respectively.