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

amtool: ignores custom path in url #1938

Closed
importantchoice opened this issue Jun 24, 2019 · 0 comments · Fixed by #1940
Closed

amtool: ignores custom path in url #1938

importantchoice opened this issue Jun 24, 2019 · 0 comments · Fixed by #1940

Comments

@importantchoice
Copy link

What did you do?

Configured alertmanager to serve the webroot under /alerts.
Configured amtool to use this url:

alertmanager.url: "https://$USER:$PASSWORD@example.com/alerts"

What did you expect to see?

amtool alert query returns a list of current alerts

What did you see instead? Under which circumstances?

A 404 Error.
amtool: error: unknown error (status 404): {resp:0xc0005ae630}

This setup worked fine under version 0.15.2. After upgrading to version 0.17.0 the error above occures

Environment

  • System information:

Linux 5.1.8-arch1-1-ARCH x86_64

  • Alertmanager version:
alertmanager, version 0.17.0 (branch: HEAD, revision: c7551cd75c414dc81df027f691e2eb21d4fd85b2)
  build user:       root@932a86a52b76
  build date:       20190503-09:10:07
  go version:       go1.12.4
  • amtool version:
amtool, version 0.17.0 (branch: HEAD, revision: c7551cd75c414dc81df027f691e2eb21d4fd85b2)
  build user:       root@932a86a52b76
  build date:       20190503-09:10:07
  go version:       go1.12.4
  • Logs:

Nginx log:

XXX.XXX.XXX.XXX - - [24/Jun/2019:19:37:26 +0200] "GET /api/v2/alerts?active=true&inhibited=false&silenced=false&unprocessed=false HTTP/1.1" 404 136 "-" "Go-http-client/1.1"

As the /alerts path does not appear in the GET request, I guess amtool ignores the configured path and assumes that alertmanager is running directly under / for a given domain.

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

Successfully merging a pull request may close this issue.

2 participants