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
unable to fetch metrics from custom metrics API #164
Comments
So, i managed to get this to work, the following needs to be done: **Few things that are important to do: ** Install prometheus-adapter+ metrics server:
You can check the logs to see if it's able to connect to prometheus, also note that i've deployed prometheus operator in the monitoring namespace (that's why the dns is monitoring.svc), if it's in default - do http://prometheus-operated.default.svc, etc...
I've decided to do average of ready messages in the last 5 minutes.
Few notes:
After applying the above, you can test it worked in few ways:
Now, perform: kubectl get --raw /apis/custom.metrics.k8s.io/v1beta1, search for your new rule under services:
Perform and check the new custom metric with: you can see it here:
Few important notes:
In the above, the autoscaler will kick in if there are on average more than 100 messages ready in queue for the last 5M. Enjoy |
@DirectXMan12 @here could someone help me on this Thanks in advance |
I'm trying to add a simple custom metric and scale a simple application based on rabbitMQ queue size,
I'm using AWS EKS - 1.10, and i was able to do HPA by CPU/memory metrics (i've also deployed the metrics server).
i've tried to follow the configuration here:
https://gitlab.ops.mist.io/mistio/mist-ce/blob/staging/chart/mist/templates/prometheusrule.yaml
those are my configurations
Deployment:
Prometheus rule:
HPA:
When going to prometheus, i can see the rule and it works:
After deploying, i get an error: unable to fetch metrics from custom metrics API
full log:
Then, i've tried to follow the official documentation, and did this:
in both tries, i don't see the metric here:
kubectl get --raw /apis/custom.metrics.k8s.io/v1beta1/
What have i missed?
The text was updated successfully, but these errors were encountered: