Topics

Accessing Cloudwatch API through a proxy server?

byteflinger@...
 

Hi

I am trying to setup grafana to access our cloudwatch metrics. The credentials file is put under the grafana home directory and I see the following in the logs


2016/02/10 12:28:04 [cloudwatch.go:133 handleListMetrics()] [E] Unable to call AWS API: RequestError: send request failed
caused by: Post https://monitoring.eu-west-1.amazonaws.com/: dial tcp 176.32.111.125:443: i/o timeout

I am relatively new to how the cloudwatch API works but I am guessing the issue here is that our production servers are not allowed to access the outside world unless they are going through a proxy. I can confirm that when I query the address mentioned in the logs through our proxy I get an answer but not otherwise.

How do I configure grafana to go through our proxy? I cannot seem to find any information about proxying datasource request in the grafana documentation

 

the credentials file should be in a directory named .aws under the
user that is running the grafana-server

On Wed, Feb 10, 2016 at 1:58 PM, <byteflinger@...> wrote:
Hi

I am trying to setup grafana to access our cloudwatch metrics. The
credentials file is put under the grafana home directory and I see the
following in the logs


2016/02/10 12:28:04 [cloudwatch.go:133 handleListMetrics()] [E] Unable to
call AWS API: RequestError: send request failed
caused by: Post https://monitoring.eu-west-1.amazonaws.com/: dial tcp
176.32.111.125:443: i/o timeout

I am relatively new to how the cloudwatch API works but I am guessing the
issue here is that our production servers are not allowed to access the
outside world unless they are going through a proxy. I can confirm that when
I query the address mentioned in the logs through our proxy I get an answer
but not otherwise.

How do I configure grafana to go through our proxy? I cannot seem to find
any information about proxying datasource request in the grafana
documentation

byteflinger@...
 

It is.

It is configured in that home of the user running grafana (which is called grafana) and happens to be /usr/share/grafana so the file is under 

/usr/share/grafana/.aws/credentials

byteflinger@...
 

OK Issue solved. I was correct about the proxy and here is how to fix the issue

https://github.com/grafana/grafana/issues/1691#issuecomment-102164444