Hello everyone,
I want to preconfigure a few datasources in my Grafana server. I have a yml file named /etc/grafana/provisioning/datasources/ansible-configuration.yml
The contents of the file are:
datasources:
- access: proxy
isDefault: true
name: Prometheus
type: prometheus
url: http://localhost:9090
- access: proxy
name: Alertmanager
type: prometheus-alertmanager
url: htp://localhost:9093
- type: cloudwatch
jsonData:
authType: keys
defaultRegion: eu-west-1
secureJsonData:
accessKey: <AWS ACCESS KEY>
secretKey: <AWS SECRET KEY>
type: cloudwatch
name: AWS Account
My problem is that it’s not working!
I have a few dashboards that I copied from my Test Environment to the Production one. But they do not gather stats because (according to logs) there is a credentials issue. In the UI I get a
Templating init failed
Metric request error
error, which is translated to an issue with the provisioned datasource:
t=2018-12-05T11:24:46+0000 lvl=eror msg="Metric request error" logger=context userId=1 orgId=1 uname=grafanaadmin error="
Failed to call cloudwatch:ListMetrics, NoCredentialProviders: no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors"
Obviously the credentials are checked and work just fine.
So, what is the problem here?