roo*_*e09 2 port http systemd prometheus
我想在端口8080而不是9090上安装Prometheus(它是正常的默认设置)。为此,我进行了编辑/etc/systemd/system/prometheus.service
以包含以下行:
ExecStart=/usr/local/bin/prometheus \
--config.file=/etc/prometheus.yaml --web.enable-admin-api \
--web.listen-address=":8080"
Run Code Online (Sandbox Code Playgroud)
即,我正在使用选项--web.listen-address
来指定非默认端口。
但是,当我使用Prometheus(2.0 beta)启动时,systemctl start prometheus
收到以下错误消息:
parse external URL "": invalid external URL "http://<myhost>:8080\"/"
Run Code Online (Sandbox Code Playgroud)
那么,如何配置Prometheus,以便可以在http://<myhost>:8080/
(而不是http://<myhost>:9090
)访问其Web UI ?
引号是多余的。此行将起作用:
ExecStart=/usr/local/bin/prometheus \
--config.file=/etc/prometheus.yaml --web.enable-admin-api \
--web.listen-address=:8080
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
9620 次 |
最近记录: |