Comments (9)
No proxy here, but the CSS loads correctly for me on all pages, including /status
. The paths are absolute in all of them. This is both when building from HEAD as well as when trying out the 0.0.4 tarball.
curl -s localhost:9093/ |grep default.css
<link href="/static/css/default.css" media="all" rel="stylesheet" type="text/css" />
curl -s localhost:9093/silences |grep default.css
<link href="/static/css/default.css" media="all" rel="stylesheet" type="text/css" />
curl -s localhost:9093/status |grep default.css
<link href="/static/css/default.css" media="all" rel="stylesheet" type="text/css" />
You said it also misbehaves without a proxy?
from alertmanager.
My examples above all were without a proxy, using the release from github, built on your thinkpad! 😀
Build Information
branch master
date 20150909-17:20:43
go_version 1.4.2
revision e00f5b1
user julius@julius-thinkpad
version 0.0.4
I'll try building 0.0.4
myself and see what happens.
from alertmanager.
Ok, that's very strange, as with that exact binary I'm not getting the problem you're seeing. It's a static binary, so we should be getting the same results.
Are you sure that your curl doesn't use a proxy (via environment variable http_proxy
or in ~/.curlrc
) that does something weird?
from alertmanager.
I just compiled 0.0.4
in a Vagrant VM, and tested again. Same results. I even zapped web/files/blob.go
.
And, no, no funky curl configs.
vagrant@vagrant-ubuntu-trusty-64:/tmp/alertmanager$ cd /tmp
vagrant@vagrant-ubuntu-trusty-64:/tmp$ rm -fr /tmp/alertmanager/
vagrant@vagrant-ubuntu-trusty-64:/tmp$ git clone https://github.com/prometheus/alertmanager.git
Cloning into 'alertmanager'...
[SNIP]
Checking connectivity... done.
vagrant@vagrant-ubuntu-trusty-64:/tmp$ cd alertmanager/
vagrant@vagrant-ubuntu-trusty-64:/tmp/alertmanager$ git co -b 0.0.4 tags/0.0.4
Switched to a new branch '0.0.4'
vagrant@vagrant-ubuntu-trusty-64:/tmp/alertmanager$ make dependencies-stamp
Go version 1.4.2 required but not found in PATH.
About to download and install go1.4.2 to /tmp/alertmanager/.build/go1.4.2
[SNIP]
touch dependencies-stamp
vagrant@vagrant-ubuntu-trusty-64:/tmp/alertmanager$ rm web/blob/files.go
vagrant@vagrant-ubuntu-trusty-64:/tmp/alertmanager$ make web
./web/blob/embed-static.sh web/static web/templates | /tmp/alertmanager/.build/go1.4.2/bin/gofmt > web/blob/files.go
vagrant@vagrant-ubuntu-trusty-64:/tmp/alertmanager$ make
GOROOT=/tmp/alertmanager/.build/go1.4.2 GOPATH=/tmp/alertmanager/.build/gopath /tmp/alertmanager/.build/go1.4.2/bin/go get -d
touch dependencies-stamp
GOROOT=/tmp/alertmanager/.build/go1.4.2 GOPATH=/tmp/alertmanager/.build/gopath /tmp/alertmanager/.build/go1.4.2/bin/go build -o alertmanager
vagrant@vagrant-ubuntu-trusty-64:/tmp/alertmanager$ touch alertmanager.conf
vagrant@vagrant-ubuntu-trusty-64:/tmp/alertmanager$ ./alertmanager &
[1] 3961
vagrant@vagrant-ubuntu-trusty-64:/tmp/alertmanager$ alertmanager, version ()
build user:
build date:
go version:
WARN[0000] Couldn't load silences, starting up with empty silence list: open silences.json: no such file or directory file=main.go line=76
INFO[0000] Replacing aggregator rules (old: 0, new: 0)... file=manager.go line=246
INFO[0000] Running notification dispatcher... file=main.go line=151
INFO[0000] listening on :9093 file=web.go line=76
INFO[0001] Recomputing notification outputs (active alerts have changed, inhibit rules have changed) file=manager.go line=398
vagrant@vagrant-ubuntu-trusty-64:/tmp/alertmanager$ curl -s 0:9093/status |grep default.css
<link href="/static/css/default.css" media="all" rel="stylesheet" type="text/css" />
vagrant@vagrant-ubuntu-trusty-64:/tmp/alertmanager$ curl -s 0:9093/silences |grep default.css
<link href="static/css/default.css" media="all" rel="stylesheet" type="text/css" />
from alertmanager.
What the...
Now I'm getting the same (that is, relative paths on everything except /status
), although the CSS still loads correctly with both path variants since it's correct both as a relative and absolute path. I have no idea why I didn't get this before, maybe I did something really wrong, even during the copy&paste of the output. Strange.
Looking more.
from alertmanager.
Aha! In HEAD it's all absolute paths. I noticed that Alertmanager doesn't shut down when it cannot acquire it's port (ugh), so I must've still been running a HEAD Alertmanager in another terminal and didn't notice that the 0.0.4 one didn't start up correctly because it doesn't indicate that properly.
Ok, so something evidently changed between 0.0.4 and HEAD there. Have you given HEAD a try?
from alertmanager.
Also in general, this current experimental Alertmanager is being replaced by a complete rewrite, of which an Alpha is now out: https://groups.google.com/forum/#!topic/prometheus-developers/AmGnO_Sj7xI
You might already want to use the new one. The old one is experimental and a horrible proof-of-concept codebase, but has seen more practical use. The new one doesn't have as many miles yet, but will be the shape of things to come and is more future-proof and properly built.
from alertmanager.
Yep, HEAD behaves correctly.
I'll try to have a look at the alpha.
It looks like this ab93482, insofar as it fixed /silences
and /alerts
by causing the pathPrefix
to now be set.
So, presently, /status
is the only path that is working "correctly".
from alertmanager.
Just to wrap this up, with 0.0.4
, if I set -web.external-url
and -web.path-prefix
everything is working.
Although, it's still the wonky behavior of not always having PathPrefix
set:
$ curl -s 0:9093/alertmanager/status|grep default.css
<link href="/alertmanager/static/css/default.css" media="all" rel="stylesheet" type="text/css" />
$ curl -s 0:9093/alertmanager/|grep default.css
<link href="static/css/default.css" media="all" rel="stylesheet" type="text/css" />
$ curl -s 0:9093/alertmanager/silences|grep default.css
<link href="static/css/default.css" media="all" rel="stylesheet" type="text/css" />
from alertmanager.
Related Issues (20)
- Guidance on pagination token
- Confusing comments in silence.go
- Move pkg/labels into matcher package
- How can I get a week's worth of alert history for Prometheus, Alertmanager via python script? HOT 2
- Assistance Needed with Prometheus and Alertmanager Configuration HOT 3
- Some alerts going to a webhook crash alertmanager - panic: runtime error: invalid memory address or nil pointer dereference HOT 4
- `route.ID()` returns conflicting IDs
- Different aggregation groups can share the same nflog HOT 1
- docker image does not recognise timezone appropriately HOT 7
- Feature request: Please sign your releases HOT 1
- Wrong Alertmanager version for v1 API removal in the logs? HOT 1
- How to fix non unique GroupKeys? HOT 7
- Alertmanager web UI is broken after installing using generate-ui.sh HOT 3
- Have a way to mute alert until it's resolved to receive a resolved notification once it's fixed HOT 11
- FR: sort matchers on silences page HOT 1
- Update docs to note api/v1 deprecation and removal HOT 1
- Go stdlib vuln - please upgrade go version HOT 4
- AlertManager not respecting repeat_interval timer setting on duplicate alert HOT 1
- `amtool` ZSH completion is broken
- Prometheus Alertmanager not sending email notifications HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alertmanager.