I would like to run Prometheus with a specific IP address. By default, it is running on localhost. I don't see any such option in the prometheus configuration
您可以使用命令行选项来配置您的监听地址
./prometheus --web.listen-address="0.0.0.0:9090"
If you're using the packages for Debian-based systems, you can persistently modify the command line argument --web.listen-address
in /etc/default/prometheus
(and same for /etc/default/prometheus-node-exporter).
You can change both the address to be bound (eg blank ( 0.0.0.0
) or 127.0.0.1
or 192.168.xx.xx
) and the port number (eg 9090
) here (eg :9090
or 127.0.0.1:9090
).
It will look like:
# Set the command-line arguments to pass to the server.
ARGS="--web.listen-address=127.0.0.1:9090"
(Don't forget to systemctl restart prometheus prometheus-node-exporter
afterward.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.