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

Exporter for AMP Credential error #520

Closed
hiranthaPeiris opened this issue May 19, 2021 · 7 comments
Closed

Exporter for AMP Credential error #520

hiranthaPeiris opened this issue May 19, 2021 · 7 comments
Labels
AMP Managed Service for Prometheus related issues metrics Metrics related issue

Comments

@hiranthaPeiris
Copy link

Hi,
I am trying to configure AMP exporter but get NoCredentialProviders on logs of the collector as following.
WARN batchprocessor/batch_processor.go:209 Sender failed {"kind": "processor", "name": "batch/metrics", "error": "Permanent error: Post \"https://aps-workspaces.us-east-1.<workspace>/api/v1/remote_write\": NoCredentialProviders: no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors"}

I have set aws access key according to default AWS credentials chain and also AWS go SDK as the documentation. what I could be missing here?

Thanks

@pingleig
Copy link
Member

pingleig commented May 19, 2021

Are you using the collector as a container or running the binary directly on your host (mac or ec2 vm etc.)? If you are running it on your host, can you try some simple command from aws cli like aws s3 ls to see if you get any credential error.

@hiranthaPeiris
Copy link
Author

hi @pingleig
I am running collector binary on ec2 instance and as you said am not getting credential errors with aws s3 ls . credentials resides in .aws dir in users $home.

@pingleig
Copy link
Member

I didn't find anything strange in the code https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/10790bb5affa048a61cf13ca20bae19b1eca39e8/exporter/awsprometheusremotewriteexporter/auth.go#L106-L121 The only suspicious part is Shared Config Fields

Did you config your credentials in ~/.aws/credentials can you try export those creds and env var and see if the exporter can pick it up. e.g. export AWS_ACCESS_KEY.... etc.

@hiranthaPeiris
Copy link
Author

I have tried with both ways still the same error log. is there a way to rebuild collector with hard coded credentials as a workaround?

@Aneurysm9
Copy link
Member

@hiranthaPeiris can you share your collector configuration?

I wouldn't recommend attempting to hard code credentials in the collector. Let's see what we can do to figure out where the disconnect is happening.

@alolita alolita added AMP Managed Service for Prometheus related issues metrics Metrics related issue labels Aug 4, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2022

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the stale label Jan 2, 2022
@alolita alolita removed the stale label Jan 3, 2022
@alolita
Copy link
Contributor

alolita commented Jan 3, 2022

Marking as resolved.

@alolita alolita closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMP Managed Service for Prometheus related issues metrics Metrics related issue
Projects
None yet
Development

No branches or pull requests

4 participants