Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRegression: alertmanager.url flag ignores basic auth #2344
Comments
bwplotka
referenced this issue
Jan 16, 2017
Merged
Fixed regression in `-alertmanager.url flag`. Basic auth was ignored. #2345
This comment has been minimized.
This comment has been minimized.
|
Created proposition for the fix ^ |
This comment has been minimized.
This comment has been minimized.
|
Fix merged. |
bwplotka
closed this
Jan 16, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
lock
bot
locked and limited conversation to collaborators
Mar 24, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
bwplotka commentedJan 16, 2017
What did you do?
What did you expect to see?
I expect that Prometheus will still parse the flag in the same way it used to do in 1.1.3. Especially when docs discourages using
alertmanager_configand recommends the "stable" alternative, which is justalertmanager.urlflag.Our
-alertmanager.urlflag is set tohttps://<login>:<password>@<static_url>. With this flag our Prometheus instances were able to reach alertmanager with basic auth encoded.What did you see instead? Under which circumstances?
time="2017-01-16T12:47:40Z" level=error msg="Error sending alerts: bad response status 401 Unauthorized" alertmanager="https://<static_url>:443/api/v1/alerts" count=1 source="notifier.go:335"Clearly no basic auth is provided.
I can see that here https://github.com/prometheus/prometheus/blob/master/cmd/prometheus/main.go#L271
u.Userdata is just ignored (where the basic auth is). Previously whole-alertmanager.urlurl was just used.Mitigation
Changing from flag to
alertmanager_configwith filledbasic_authoptions and removing flag obviously helped alert are propagating.Second issue is that when both flag and
alertmanager_configwas specified, Prometheus was not able to reach alertmanager entirely as well.Environment
Not relevant, but:
Not relevant, no
<alertmanager_config>is configured.Not relevant.