yet-another-cloudwatch-exporter: [Question] API GW V2 metrics not found with dimensionNameRequirements
Hello,
I have a question regarding the scraping of API GW V2 metrics. I noticed that the supporting PR was released in v0.52.0 for scraping API GW V2 metrics (HTTP API).
We have this config block in our config.yaml:
# API GW V1 (REST)
# https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-metrics-and-dimensions.html
- <<: *default_job_config
type: AWS/ApiGateway
dimensionNameRequirements:
- ApiName
- Stage
metrics:
- name: Latency
statistics: [ Average, Maximum, p95, p99 ]
- name: Count
statistics: [ SampleCount, Sum ]
- name: 4XXError
statistics: [ Sum, Average ]
- name: 5XXError
statistics: [ Sum, Average ]
# API GW V2 (HTTP)
# https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-metrics.html
- <<: *default_job_config
type: AWS/ApiGateway
dimensionNameRequirements:
- ApiId
- Stage
- Route
metrics:
- name: Latency
statistics: [ Average, Maximum, p95, p99 ]
- name: Count
statistics: [ SampleCount, Sum ]
- name: 4xx
statistics: [ Sum ]
- name: 5xx
statistics: [ Sum ]
default_job_config has the values:
default_job_config: &default_job_config
addCloudwatchTimestamp: true
roles:
- <roles>
regions:
- eu-west-1
period: 300
length: 300
We are also using these feature flags:
-enable-feature=aws-sdk-v2,max-dimensions-associator,list-metrics-callback
But we are getting these logs when running (multiple times):
{"account":"<account>","arn":"<role>","job_type":"AWS/ApiGateway","level":"info","msg":"No metrics data found","region":"eu-west-1","time":"2023-06-22T13:09:42Z"}
What are we doing wrong in our config.yaml?
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 29 (2 by maintainers)
I’ve dumped a potential fix for the feature flag
maxdimassociatorin https://github.com/nerdswords/yet-another-cloudwatch-exporter/pull/1081It seems to work correctly now, but you need https://github.com/nerdswords/yet-another-cloudwatch-exporter/pull/1067 as well. I’ll try to get both merged tomorrow and so you can test a build from
master.Hello @cristiangreco,
I just tested #1067
and it seems to work! In the debug output, the labels: Method, Stage and Resource are being registered and shown correctly!Sorry, I misinterpret the debug output, after testing #1067, it seems that it still does not work. From the
/metricspage, I still see that the labels method, stage and resource are missing:I am seeing this in debug logging output: