question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Global accesible metrics not being pulled

See original GitHub issue

I am trying to pull metrics from our us-east-1 AWS account in order to pull Cloudfront and Cloudtrail metrics.
Per the documentation, the Region value must be Global
However that does not work. From this thread, setting the region to us-east-1 should solve the issue. However, it did not.

Here is my configuration file:

region: us-east-1
metrics:
   - aws_namespace: WAF
     aws_metric_name: BlockedRequests
     aws_statistics: [Sum]

   - aws_namespace: AWS/Billing
     aws_dimensions: [Currency]
     aws_dimensions_select:
       Currency: [USD]
     aws_metric_name: EstimatedCharges
     aws_statistics: [Maximum]
     range_seconds: 86400

   - aws_namespace: AWS/CloudFront
     aws_metric_name: Requests
     aws_statistics: [Sum]
     aws_dimensions: [DistributionId]

And here is the metrics being scraped

curl localhost:9106/metrics
# HELP aws_billing_estimated_charges_maximum CloudWatch metric AWS/Billing EstimatedCharges Dimensions: [Currency] Statistic: Maximum Unit: None
# TYPE aws_billing_estimated_charges_maximum gauge
aws_billing_estimated_charges_maximum{job="aws_billing",instance="",currency="USD",} XXXXXX
# HELP cloudwatch_exporter_scrape_duration_seconds Time this CloudWatch scrape took, in seconds.
# TYPE cloudwatch_exporter_scrape_duration_seconds gauge
cloudwatch_exporter_scrape_duration_seconds XXXXXX
# HELP cloudwatch_exporter_scrape_error Non-zero if this scrape failed.
# TYPE cloudwatch_exporter_scrape_error gauge
cloudwatch_exporter_scrape_error 0.0
# HELP cloudwatch_requests_total API requests made to CloudWatch
# TYPE cloudwatch_requests_total counter
cloudwatch_requests_total XXXXX

When logged in in the AWS console, the Cloudwatch and Cloudtrail logs are indeed present.

Do I miss something ?

PS: It is a duplicate from here, but unfortunately the ticket has been closed without solution.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
eranreshefcommented, May 4, 2020

I am running into a similiar problem, but with WAFV2 instead of CloudFront. Unfortunately, the above solution does not work for me. My configuration is:

metrics:
  - aws_namespace: AWS/WAFV2
    aws_metric_name: BlockedRequests
    aws_dimensions: [Rule, WebACL, Region]
    aws_dimensions_select:
      Region: [eu-west-1]

I am not specifying the Region parameter as the exporter is running on an EC2 instance and it should be automatically taken from the instance metadata. When I call localhost:9106/metrics I get all the metrics from other services and:

cloudwatch_requests_total{action="listMetrics",namespace="AWS/WAFV2",} 129.0
cloudwatch_requests_total{action="getMetricStatistics",namespace="AWS/WAFV2",} 1753.0

without the actual WAF metrics, but when I try with aws-cli aws cloudwatch list-metrics --namespace AWS/WAFV2 --metric-name BlockedRequests --dimensions Name=Region,Value=eu-west-1 I get the list of all the available metrics that meet these conditions.

What am I doing wrong here?

0reactions
Mornorcommented, Jun 19, 2018

Sure! I’ll create a pull request today 😃 https://github.com/prometheus/cloudwatch_exporter/pull/110

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon CloudWatch FAQs - Amazon Web Services (AWS)
You can monitor your own data using custom metrics, CloudWatch Logs, or both. You may want to use custom metrics if your data...
Read more >
Google Cloud metrics - Monitoring
After sampling, data is not visible for up to 180 seconds. ... bigquery_project, global, Distribution of execution times for queries that completed ...
Read more >
Understanding and adding metrics — ParlAI Documentation
If you're not sure what a metric means, refer to our List of metrics. ... A global metric is computed anywhere in the...
Read more >
Resource metrics pipeline - Kubernetes
Resource metrics are accessible using the /metrics/resource and /stats ... In an ideal world, the "working set" is the amount of memory ...
Read more >
Troubleshoot common issues - Azure Container Instances
1 Restriction also for container group names when not specified ... If Azure Container Instances is initially unable to pull your image, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found