[英]How to configure a specific IP in prometheus yml configuration file?
您可以使用命令行选项来配置您的监听地址
./prometheus --web.listen-address="0.0.0.0:9090"
如果您使用基于 Debian 的系统的软件包,您可以持续修改/etc/default/prometheus
的命令行参数--web.listen-address
(对于 /etc/default/prometheus-node-exporter 也是如此) .
您可以在此处更改要绑定的地址(例如空白( 0.0.0.0
)或127.0.0.1
或192.168.xx.xx
)和端口号(例如9090
)(例如:9090
或127.0.0.1:9090
)。
它看起来像:
# Set the command-line arguments to pass to the server.
ARGS="--web.listen-address=127.0.0.1:9090"
(之后不要忘记systemctl restart prometheus prometheus-node-exporter
。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.