On 2021-09-06 11:07, Dmitriy Alekseev wrote:
Hello, I created 2 scrapers in docker-compose:
cloudwatch-eu-west-1:
image: prom/cloudwatch-exporter
container_name: cloudwatch-eu-west-1
volumes:
- './config:/config'
command:
- '/config/cloudwatch-eu-west-1.yml'
networks:
- monitor-net
depends_on:
- prometheus
labels:
org.label-schema.group: 'monitoring'
environment:
- AWS_REGION=eu-west-1
cloudwatch-ap-northeast-1:
image: prom/cloudwatch-exporter
container_name: cloudwatch-ap-northeast-1
volumes:
- './config:/config'
command:
- '/config/cloudwatch-ap-northeast-1.yml'
networks:
- monitor-net
depends_on:
- prometheus
labels:
org.label-schema.group: 'monitoring'
environment:
- AWS_REGION=ap-northeast-1
EC2 with this exporters has IAM role to all required cloudwatch/tags
permissions, not limited by regions or anything else.
EC2 located at eu-west-1 region and successfully scrape data from
eu-west-1 cloudwatch. Scrape duration takes 6s.
But I have issue with ap-northeast-1: scrape duration takes 68s and
don't return any data. I double checked it by directly requesting data
from scraper: docker-compose exec sqsexporter-eu-west-1 wget -O-
http://cloudwatch-ap-northeast-1:9106/metrics
Also I already use jmal98/sqs-exporter for both regions and it works
fine. I noticed the scrape duration, and it makes me worried:
eu-west-1 takes 1s when ap-northeast-1 takes 13s which is greatly
longer.
Does anyone has same issues? I need to use this exporters strictly in
exact AWS region where they deployed at? This not sounds like this
mandatory, but reality says exactly this.
In general I would expect API calls to other regions to take longer. You
might find a small improvement by locating the exporters within the
different regions, but it might not be worth the extra cost/complexity.
How frequently are you wanting to scrape those exporters? As CloudWatch
isn't real-time I don't gerneally scrape them at a high frequency.
--
Stuart Clark
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/f31d2eb54ea87d86d0b4f1a451ae0f49%40Jahingo.com.