-
Notifications
You must be signed in to change notification settings - Fork 788
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
Add support for extracting node attributes #266
Conversation
Hi Elad, thanks for the PR. Can you explain the use case for the node attributes? Do they differ over the nodes in a cluster? |
Yes |
ok, yes. Make sense. The problem I see with the PR is that the node attributes are only added to the metrics of the node subcollector. The other subcollectors don't receive the node attributes labels. A way out would be an approach comparable to #207 (comment) So I suggest creating a const metric For example To avoid metric label clashes, we should prefix the label name with (for example) |
ok, I see what you mean, and then do a join to match the attribute and the rest of the data, that will also greatly affect the grafana dashboard but indeed will make it easier if for any reason the attributes will be required outside the nodes (although that's the only place where they are returned in the response AFAIK) |
not having consistent labels (that are specific to a ES node) was actually a problem before and was fixed by the clusterinfo subcollector. So I appreciate you're going the extra mile implementing the feature as proposed |
@zwopir Updated the PR with the additional metrics |
the proposal of the const metric was meant as a replacement for the additional labels |
while I agree it can replace it, I don't see how it's different than the node roles which are also set in the node metrics in additional to the const metrics. |
Any updates on this? For many metrics, we would really like to differentiate between the data tiers (e.g. hot and frozen nodes). Is there some solution in place I am not seeing? |
This PR will allow setting comma separated list of node attributes to use as labels.
If the node will not have the required label, the value will fallback to empty string