Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

SQS Metrics Appear to be Multiplied by 1000 #6

Closed
stevenpall opened this issue Jul 17, 2019 · 6 comments
Closed

SQS Metrics Appear to be Multiplied by 1000 #6

stevenpall opened this issue Jul 17, 2019 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@stevenpall
Copy link

Hi there,

I'm trying to use the ApproximateNumberOfMessagesVisible metric from an SQS queue, and for some reason the current value is being reported as the actual number * 1000. As a workaround, I've just multiplied the target value by 1000 as well, but this is unintuitive.

For reference, here are my ExternalMetric and HorizontalPodAutoscaler objects:

apiVersion: metrics.aws/v1alpha1
kind: ExternalMetric
metadata:
  name: test-sqs-length
spec:
  name: test-sqs-length
  resource:
    resource: "deployment"
  queries:
    - id: sqs_test_length
      metricStat:
        metric:
          namespace: "AWS/SQS"
          metricName: "ApproximateNumberOfMessagesVisible"
          dimensions:
            - name: QueueName
              value: "test"
        period: 300
        stat: Average
        unit: Count
      returnData: true
kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta1
metadata:
  name: test
spec:
  scaleTargetRef:
    apiVersion: apps/v1beta1
    kind: Deployment
    name: test
  minReplicas: 2
  maxReplicas: 50
  metrics:
  - type: External
    external:
      metricName: test-sqs-length
      targetValue: 1000000

In this case, I'm actually aiming for a targetValue of 1000. I'm not sure if this is a bug or something I'm doing wrong, but I'd appreciate some assistance either way!

@chankh
Copy link
Contributor

chankh commented Jul 24, 2019

Thanks for reporting, you are right.

chankh added a commit that referenced this issue Jul 24, 2019
@chankh chankh self-assigned this Jul 24, 2019
@chankh
Copy link
Contributor

chankh commented Jul 24, 2019

@stevenpall this change should be available in the latest image

@stevenpall
Copy link
Author

Thank you!

@stevenpall
Copy link
Author

@chankh Would you be able to create a new image tag for this (0.5.0)? I try to avoid using latest whenever possible.

@homme
Copy link
Contributor

homme commented Aug 1, 2019

A bugfix release makes sense: this affected AWS/RDS CPUUtilization as well.

@chankh chankh added the bug Something isn't working label Aug 6, 2019
@chankh
Copy link
Contributor

chankh commented Aug 6, 2019

agree and released

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants