-
Notifications
You must be signed in to change notification settings - Fork 556
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
External Metrics metricName is always empty #235
Comments
I have the same problem. Also all I am wanting to use the metric My external metric looks like this:
If I put
kubectl raw results:
All values are
What are we missing here? |
Ahh mine is working, it's just that all the metrics are getting rounded down to
But my |
@max-rocket-internet were you able to use an HPA with
and you were able to get the value for that particular label? My case is that it gives me the sum of all values. |
I haven't tried this just yet but will try to implement something in the next few weeks with an SQS queue metric. |
@max-rocket-internet Did you get a SQS queue metric working? |
Not yet as I've been working on other tasks. I'll come back to this soon though. |
I got the same issue, it looks like the metric This is the adapter log, as I can see, the query sends to Prometheus doesn't include the
metrics:
HPA object: apiVersion: autoscaling/v2beta1
spec:
metrics:
- type: Object
object:
metricName: celery_queue_size
selector:
matchLabels: {'queue': 'heavy'}
targetValue: 1000
target:
apiVersion: v1
kind: Namespace
name: staging adapter rules: seriesQuery: '{__name__="celery_queue_size",namespace!="",queue!=""}'
resources:
template: <<.Resource>>
name: {"as": "celery_queue_size"}
metricsQuery: sum(<<.Series>>{<<.LabelMatchers>>}) by (<<.GroupBy>>, queue) |
I think the issue could be the version of docker image is used for adapter. See this fix: #196, I think it only available for v0.6.0 (latest), so if you are using an older version, then you will have this problem |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: 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. |
I have installed the latest helm chart into my cluster and configured 2 external metrics for the adapter as below:
The adapter is able to fetch them and post them into the external metrics api of the k8s cluster but when I run this command
kubectl get --raw "/apis/external.metrics.k8s.io/v1beta1/namespaces/platform/sidekiq_queue_enqueued_jobs"
, I always get the metrics withmetricName
field empty as belowThe problem I am facing now is that when I use this in HPA with label selectors, it adds both numbers and ignores the label.
Here is the external metric in HPA:
Any idea if I am missing something or there is an issue in the external provider?
The text was updated successfully, but these errors were encountered: