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

Metrics response is always getting a value 0.0 #84

Open
chay2199 opened this issue May 14, 2021 · 0 comments
Open

Metrics response is always getting a value 0.0 #84

chay2199 opened this issue May 14, 2021 · 0 comments

Comments

@chay2199
Copy link

chay2199 commented May 14, 2021

I have had debug=true in my CloudWatch adapter and looking to scale using the external metric NumberOfMessagesReceived in my SQS queue. While the aws console is showing a good enough count. The api response is always zero. Also I tried using the cmd

aws cloudwatch get-metric-statistics --metric-name ApproximateNumberOfMessagesVisible --start-time 2020-09-12T01:00:00z --end-time 2020-09-12T01:10:00z --period=60 --namespace AWS/SQS --statistics Average --dimensions Name=QueueName,Value=sn_push_user_incoming_queue_dev --unit Count

As suggested in another closed issue related to this but even by adjusting period, time, stat or unit. I am not able to get any datapoint while the cloudwatch graphs are showing data values much greater than zero.

Action=GetMetricData&EndTime=2021-05-14T22%3A42%3A00Z&MetricDataQueries.member.1.Id=sqs_ccplink&MetricDataQueries.member.1.Label=&MetricDataQueries.member.1.MetricStat.Metric.Dimensions.member.1.Name=QueueName&MetricDataQueries.member.1.MetricStat.Metric.Dimensions.member.1.Value=ccp-link-request-queue-beta&MetricDataQueries.member.1.MetricStat.Metric.MetricName=NumberOfMessagesReceived&MetricDataQueries.member.1.MetricStat.Metric.Namespace=AWS%2FSQS&MetricDataQueries.member.1.MetricStat.Period=1&MetricDataQueries.member.1.MetricStat.Stat=Sum&MetricDataQueries.member.1.MetricStat.Unit=Count&MetricDataQueries.member.1.ReturnData=true&ScanBy=TimestampDescending&StartTime=2021-05-14T22%3A37%3A00Z&Version=2010-08-01 2021/05/14 22:42:17 DEBUG: Response monitoring/GetMetricData Details:

HTTP/1.1 200 OK
Content-Length: 918
Content-Type: text/xml
Date: Fri, 14 May 2021 22:42:17 GMT
X-Amzn-Requestid: b795af34-a724-4526-9717-26809f6ac67d
2021/05/14 22:42:17 <GetMetricDataResponse xmlns="http://monitoring.amazonaws.com/doc/2010-08-01/">
  <GetMetricDataResult>
    <MetricDataResults>
      <member>
        <Timestamps>
          <member>2021-05-14T22:41:00Z</member>
          <member>2021-05-14T22:40:00Z</member>
          <member>2021-05-14T22:39:00Z</member>
          <member>2021-05-14T22:38:00Z</member>
          <member>2021-05-14T22:37:00Z</member>
        </Timestamps>
        <Values>
          <member>0.0</member>
          <member>0.0</member>
          <member>0.0</member>
          <member>0.0</member>
          <member>0.0</member>
        </Values>
        <Label/>
        <Id>sqs_ccplink</Id>
        <StatusCode>Complete</StatusCode>
      </member>
    </MetricDataResults>
    <Messages/>
  </GetMetricDataResult>
  <ResponseMetadata>
    <RequestId>b795af34-a724-4526-9717-26809f6ac67d</RequestId>
  </ResponseMetadata>
</GetMetricDataResponse>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant