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 up_ in alertmanager.url gives 'ERRO[0000] invalid Alertmanager URL' #2717
Comments
This comment has been minimized.
This comment has been minimized.
|
The library we use for checking urls probably needs updating again. |
brian-brazil
added
help wanted
and removed
help wanted
labels
Jul 17, 2017
This comment has been minimized.
This comment has been minimized.
|
We use govalidator to do it here: https://github.com/prometheus/prometheus/blob/master/cmd/prometheus/config.go#L354-L369 I verified in the latest master of govalidator that the URL specified above: Opened asaskevich/govalidator#212 upstream but not sure it will be fixed there soon. One thing we could do is just pull out the IsURL logic out into prometheus itself and add support for |
This comment has been minimized.
This comment has been minimized.
|
I'm against adding support for underscores, it's clearly forbidden by the RFC 952. That there is no validation for entries in /etc/hosts does not change that. |
grobie
removed
the
kind/bug
label
Jul 21, 2017
rmeleromira
added a commit
to rmeleromira/prometheus
that referenced
this issue
Jul 31, 2017
rmeleromira
added a commit
to rmeleromira/prometheus
that referenced
this issue
Jul 31, 2017
rmeleromira
added a commit
to rmeleromira/prometheus
that referenced
this issue
Jul 31, 2017
pgier
referenced this issue
Sep 20, 2017
Merged
cmd/prometheus: remove govalidator for url validation #3199
pgier
added a commit
to pgier/prometheus
that referenced
this issue
Oct 4, 2017
This comment has been minimized.
This comment has been minimized.
|
We relaxed the validation criteria after all. |
grobie
closed this
Oct 4, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 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. |
rmeleromira commentedMay 14, 2017
•
edited
What did you do?
Try to start prometheus with a
-in alertmanager.url hostname.What did you expect to see?
Prometheus startup
What did you see instead? Under which circumstances?
Prometheus fails to start with
ERRO[0000] invalid Alertmanager URLEnvironment
After changing
_in alertmanager.url to-RFC 952 says that:
But the rule apparently isn't strictly followed by DNS servers and names in an
/etc/hostsfile can contain underscores.Just pointing out that there's a little inconsistency in hostname handling, and we possibly need a better error for special characters? Something like: