-
Notifications
You must be signed in to change notification settings - Fork 10
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
Using IAM user authentication instead of assume role arn and default ~/.aws/credentials #130
Comments
I understand that you would like to have a way to collect metrics of several AWS accounts/regions within in the same Prometheus RDS exporter deployment. Implementation will require bunch of changes because we need to pass AWS credentials and exporter settings per "Prometheus scrape". I guess the best approach will be to support parameters in Prometheus RDS exporter URLs and leverage on Prometheus This is much more flexible than static configuration file and more relevant in cloud/container era. So we may image something like: scrape_configs:
- job_name: prometheus-rds-exporter-cn
metrics_path: /metrics
params:
aws_role_arn: arn:aws:iam::76784568345:role/my-role
aws_region: cn-north-1
collect-quotas: false
...
...
- job_name: prometheus-rds-exporter-us
metrics_path: /metrics
params:
aws_role_arn: arn:aws:iam::12345677890:role/my-role
aws_region: us-east-1
collect-quotas: true
...
... Macro steps:
We can't implement it right know ourself, but we are open to contribution (See |
@vmercierfr thanks for the tips, I changed the code in my local, after making the change, the configuration part would be
it works fine for all regions from AWS Global, however it doesn't work for AWS China, I suspect the endpoint needs to be changed accordingly, since I am newbie to Golang, need some time to fix it. |
@vmercierfr could you please review this PR #140, I tested the change in my local, it's possible to retrieve metrics across account and region, not sure if there is potential issue, since I am new to Golang, thanks! |
Is there any progress on this issue? |
Vincent's answer is the most up to date:
|
Is your feature request related to a problem? Please describe
prometheus-rds-exporter is nice, and I created service accounts for several aws accounts because have other use cases, for other cases, I can use IAM user (service account) credentials to invoke boto3 APIs, so I want to reuse the credentials for prometheus-rds-exporter, however the doc is not clear enough on configuring aws credentials especially on configuring multiple aws accounts.
Describe the solution you'd like
I'd like a solution similar to ec2_sd_scrapes, I just need provide region and different endpoint and aws credentials via configuration
and I see rds_exporter has such feature for multiple instances:
so I am seeking a doc to provide the same configuration for prometheus-rds-exporter
Describe alternatives you've considered
if it's not yet implemented, would you please share more details on enhancement point if I want to implement such feature?
Additional context
NA
The text was updated successfully, but these errors were encountered: