cloudfoundry/prometheus-boshrelease

Set Alertmanager Proxy not working

giva01121 opened this issue · 2 comments

Hello,
I've setup the http_proxy property in the alertmanager job, but it's not working. I'm trying to reach https://api.eu.opsgenie.com

here's my configuration:

- type: replace
  path: /instance_groups/name=alertmanager/jobs/name=alertmanager/properties?/env
  value:
    http_proxy: http://http-proxy.blabla:8080
    https_proxy: http://http-proxy.blabla:8080

When I check the prometheus manifest I can see that the proxy appears. But in the alertmanager instance logs I can see the following:

level=debug ts=2020-03-26T13:48:12.659Z caller=notify.go:667 component=dispatcher msg="Notify attempt failed" attempt=15 integration=opsgenie receiver=warning err="Post https://api.eu.opsgenie.com/v2/alerts: dial tcp: lookup api.eu.opsgenie.com on 10.201.135.250:53: no such host"

So just for the test I've tried manually to hardcode the proxy entry in the alertmanager's instance /etc/environment file. Then I've made a curl request to api.eu.opsgenie.com which was successful.
The version of prometheus-boshrelease which I'm using is : v26.1.0

Hello,

You can use this configuration :

- type: replace
  path: /instance_groups/name=alertmanager/jobs/name=alertmanager/properties/alertmanager/http_config?
  value:
    proxy_url: http://proxy_host:proxy_ip

It work for us.

Closing due to inactivity; Fell free to re-open if issue persists;