-
Notifications
You must be signed in to change notification settings - Fork 3.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
Add Metrics to VPA Recommender #1631
Comments
I assume container and vpa_name is a label? In that case I am afraid that this is against the label best practices in Kubernetes - we want to avoid metrics with huge cardinality and this means that all possible label values should ideally be known beforehand and not too many: https://github.com/kubernetes/community/blob/b3349d5b1354df814b67bbdee6890477f3c250cb/contributors/devel/instrumentation.md#dimensionality--cardinality |
Would there be another way to label the metric? In essence there are only 3 labels that I need:
For the last point, the easiest way is probably to use the VPA name and namespace, but this goes against the best practices. |
I think it would be best to consult sig-instrumentation on this, can you try their slack channel? https://kubernetes.slack.com/messages/sig-instrumentation |
Any update here? I asked in the slack channel and haven't gotten a response yet. |
In general, I am still against putting this into core VPA. The biggest problem is that the set of label values is not known up-front and can be arbitrarily big, this is exactly what we want to avoid in core metrics. VPAs can be created for all the deployments in a cluster, in big clusters this can get very problematic. It shouldn't however be too hard to implement your own controller scraping this information and exporting the metrics (you can take the code reading VPA objects from recommender). You can also try contributing this to the https://github.com/kubernetes/kube-state-metrics project - this add-on exports exactly these sort of metrics (per-object) and it's understood that if you run it, you run the risk of getting high cardinality in big clusters. |
I'll close this one, unless I get clear signal from sig-instrumentation that this would be somehow ok, I'm against. |
@bskiba: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
FYI I've just raised a PR to add this to kube-state-metrics: kubernetes/kube-state-metrics#791 |
* [api/v1alpha1] Make MultiKueueCluster an API object. * [multikueue] Make MultiKueueCluster an API object. * Fix after rebase * Review Remarks * Review Remarks * Review Remarks * [API/multikueue] Drop KubeConfig.Name * Review remarks * Review remarks
Hello,
we would like to use the vertical pod autoscaler and it would help if we could monitor the recommendations that the VPA recommender gives with prometheus. Would it be possible to expose these metrics in the VPA recommender?
I'm hoping that the metric could look something like this:
vpa_recommender_recommendation{container="<container>",job="vpa",pod="<pod>",recommendation_type="lower_bound",resource_name="cpu",vpa_name="<vpa>"}
I'd be willing to open a PR for this if it is accepted.
The text was updated successfully, but these errors were encountered: