-
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
Move parts of metricset code to Elasticsearch module #7103
Conversation
jenkins, test this |
bef8824
to
f3f9e0b
Compare
This is inspired by elastic#7074. More work is needed.
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 looks mostly good to me, only some comments. I also wonder if we should mention somewhere that paths configuration behaviour changes, like the breaking change mentioned in #7074.
|
||
const ( | ||
defaultScheme = "http" | ||
pathConfigKey = "management_path_prefix" |
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 pathConfigKey
was path
before. I used management_path_prefix
in #7074 because this is the terminology in RabbitMQ.
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.
Ups, this is a leftover. Changed to path
.
|
||
http, err := helper.NewHTTP(base) | ||
// Get the stats from the local node | ||
ms, err := elasticsearch.NewMetricSet(base, "/_nodes/_local/stats") |
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.
Move this path also to its own constant?
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.
move to a constant. I normally only use constant if it's used more then at least once.
For the path change you mentioned: It's not something that is documented in the Elasticsearch module and I hope / assume it's not used as it's not something that can be changed itself in ES. I wonder if we should remove it completely? |
Merging it now, and letting the path option removal by now. |
This is inspired by #7074. More work will follow in other PR's.