Skip to content
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

[metrics]: AWS/ApiGateway metrics '4xx' and '5xx' were not exported. #599

Open
foymikek opened this issue Nov 2, 2023 · 4 comments
Open
Labels
metrics-configuration How to configure specific metrics for collection

Comments

@foymikek
Copy link

foymikek commented Nov 2, 2023

Context information

AWS service: ApiGateway
CloudWatch namespace: AWS/ApiGateway
Metrics documentation for this service: cloudwatch cli: aws cloudwatch list-metrics --namespace AWS/ApiGateway

Attempted Exporter configuration 1
    - aws_namespace: AWS/ApiGateway
      aws_metric_name: 4xx
      aws_dimensions: [ApiId]
    - aws_namespace: AWS/ApiGateway
      aws_metric_name: 5xx
      aws_dimensions: [ApiId]    
Attempted Exporter configuration 2
    - aws_namespace: AWS/ApiGateway
      aws_metric_name: 4xx
      aws_dimensions: [Stage,ApiId]
    - aws_namespace: AWS/ApiGateway
      aws_metric_name: 5xx
      aws_dimensions: [Stage,ApiId]    
Working Exporter configuration for comparison
  - aws_namespace: AWS/ApiGateway
    aws_metric_name: Count
    aws_dimensions: [ApiId]

What do you expect to happen?

Cloudwatch '4xx' and '5xx' metrics to be exported.

What happened instead?

Both '4xx' and '5xx' metrics were not exported or recognized.

For comparison I have included a ApitGateway metric that was successfully exported using the config from the same documentation source; aws cloudwatch list-metrics --namespace AWS/ApiGateway

There were two metric configs listed for '4xx' and '5xx' respectively. Both were attempted and both have been included above.

@foymikek foymikek added the metrics-configuration How to configure specific metrics for collection label Nov 2, 2023
@gaoruifeng
Copy link

gaoruifeng commented Nov 22, 2023

Please use 4XXError and 5XXError as shown in the example: https://github.com/prometheus/cloudwatch_exporter/blob/master/examples/ApiGateway.yml

@foymikek
Copy link
Author

foymikek commented Dec 11, 2023

Referencing the documentation above, the below has failed to pull metrics through.

Config Used
  - aws_namespace: AWS/ApiGateway
    aws_metric_name: 4XXError
    aws_dimensions: [Stage,ApiName]
  - aws_namespace: AWS/ApiGateway
    aws_metric_name: 5XXError
    aws_dimensions: [Stage,ApiName] 

@matthiasr
Copy link
Contributor

It seems from the documentation that Stage requires detailed metrics. What happens when you remove it from aws_dimensions?

@matthiasr
Copy link
Contributor

What is the output of aws cloudwatch list-metrics --namespace AWS/ApiGateway for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metrics-configuration How to configure specific metrics for collection
Projects
None yet
Development

No branches or pull requests

3 participants