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

[Bug] Affected alerts are not returned on the page of a silence in 0.9.0 #1007

Closed
benclapp opened this issue Sep 29, 2017 · 2 comments · Fixed by #1008
Closed

[Bug] Affected alerts are not returned on the page of a silence in 0.9.0 #1007

benclapp opened this issue Sep 29, 2017 · 2 comments · Fixed by #1008
Assignees

Comments

@benclapp
Copy link

The 'Affected alerts' field of an active silence is displaying 'Network error' rather than the alerts affected by this silence.

It looks like the request to get affected alerts has dropped the web.external-url value from the request.

Version 0.8.0 was requesting: http://alertmanager.foo.bar:9093/api/v1/alerts?silenced=true&filter=action%3D%22scale-in%22

Version 0.9.0 is requesting: http://alerts?silenced=true&filter=action%3D%22scale-in%22

@benclapp benclapp changed the title Affected alerts are not returned on the page of a silence in 0.9.0 [Bug] Affected alerts are not returned on the page of a silence in 0.9.0 Sep 29, 2017
@stuartnelson3 stuartnelson3 self-assigned this Sep 29, 2017
@stuartnelson3
Copy link
Contributor

I remember seeing this issue in the past when first adding this feature, but I haven't so far been able to reproduce it.

Running alertmanager:

# ./alertmanager -web.external-url http://localhost:3000/alertmanager/

Running local nginx proxy that forwards localhost:3000/alertmanager to localhost:9093, my requests have had the correct url

  server { # simple reverse-proxy
    listen       3000;
    server_name  domain2.com www.domain2.com;

    location /alertmanager/ {
      proxy_pass      http://localhost:9093;
    }
  }

How are you starting your alertmanager?

./alertmanager -web.external-url='http://alertmanager.foo.bar:9093'

@benclapp
Copy link
Author

benclapp commented Sep 29, 2017

I discovered it with the alertmanager docker image. So starting with one of the command flags set like below. It was working OK in 0.8.0 and now, after the fix you made in #1008. Below is a snippet of a docker-compose I was able to reproduce the issue with:

alertmanager:
image: quay.io/prometheus/alertmanager:latest
container_name: alertmanager
restart: always
ports:
- 9093:9093
volumes:
- ./alertmanager/:/etc/alertmanager/
- /opt/alertmanager:/alertmanager
command:
- '-config.file=/etc/alertmanager/config.yml'
- '-storage.path=/alertmanager'
- '-web.external-url=http://<hostname>:9093'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants