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

how <ec2_sd_config> works in china region #3897

Closed
Diannone opened this Issue Mar 1, 2018 · 7 comments

Comments

Projects
None yet
4 participants
@Diannone
Copy link

Diannone commented Mar 1, 2018

Hi,I am using Prometheus on ec2 in china region, and I found that <ec2_sd_config> can't work because of aws endpoint.

The ec2 endpoint in China region is ec2.cn-north-1.amazonaws.com.cn. And it is different from ec2 endpoint in global.

So how can I pass the china region ec2 endpoint to Prometheus?
wx20180301-160447 2x

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 1, 2018

Make sure you specify the right region in China.

It makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 1, 2018

Actually this might be a bug on our end. Can you share your prometheus.yml?

@brian-brazil brian-brazil reopened this Mar 1, 2018

@elbertwang

This comment has been minimized.

Copy link

elbertwang commented Mar 12, 2018

@brian-brazil

  • job_name: 'node'
    ec2_sd_configs:
    - region: cn-northwest-1
    access_key: xx
    secret_key: xx
    port: 9100

error log:
level=error ts=2018-03-12T04:42:20.768076165Z caller=ec2.go:174 component="discovery manager scrape" discovery=ec2 msg="Refresh failed" err="could not describe instances: RequestError: send request failed\ncaused by: Post https://ec2.cn-northwest-1.amazonaws.com/: dial tcp: lookup ec2.cn-northwest-1.amazonaws.com on 172.31.0.2:53: server misbehaving"

root cause :
AWS China has two regions: cn-north-1 & cn-northwest-1
both these two regions have different EC2 endpoint from global region which defined in
http://docs.amazonaws.cn/en_us/general/latest/gr/rande.html#cnnorth_region

cn-north-1: ec2.cn-north-1.amazonaws.com.cn
cn-northwest-1: ec2.cn-northwest-1.amazonaws.com.cn

@Diannone

This comment has been minimized.

Copy link
Author

Diannone commented Mar 12, 2018

@elbertwang thx
@brian-brazil just like the above description

@Diannone

This comment has been minimized.

Copy link
Author

Diannone commented May 2, 2018

@brian-brazil
Hello,May I know the time when this bug will be repaired?

Our products are all on Amazon Machines,if this bug can't repair on next release,I have to add more than 100 machine's monitor Manually

Thanks

@bege13mot

This comment has been minimized.

Copy link
Contributor

bege13mot commented May 8, 2018

Hi,

According to aws/aws-sdk-go#600 the issue caused by missed regions in aws-sdk-go. Made PR to update aws-sdk-go to a new version. Hope, it will be helpful.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.