prometheus/cloudwatch_exporter

Request frequency issue

olyhao opened this issue · 1 comments

Hello, I have a few questions that I am confused about.

  1. Which indicator is related to the frequency of requesting the CloudWatch API interface? delay_second or period_second. (If you change delay_second 60s, will it increase the request frequency by 10 times, causing the API request cost to increase by 10 times?)
  2. The alarm delay is related to delay_second, which defaults to 10 minutes. Will it have any impact if it is set to 60s? Why don't you provide 60s by default, because a 10-minute alarm has no meaning.
  1. Neither – the exporter requests the metrics every time it is scraped, so the request frequency is your Prometheus scrape interval. #621 has some discussion on maybe breaking that relation through caching, but with a single scraper there is limited use in a higher scrape frequency than the period you request.
  2. The delay_second setting accounts for the fact that CloudWatch metrics converge over time – CloudWatch may give you an answer sooner, but there is no guarantee that (even for the same minute!) it will be the same when you ask later. Prometheus on the other hand only ingests each sample once, once Prometheus has seen it, this value is final. The 10 minute delay is a mostly-safe default that works for most (but by far not all) AWS services.