metrics/cfg: add a new entry for the Prometheus listen address

This commit is contained in:
Nico Rey 2022-02-21 12:50:44 -03:00
parent d5fd7a5c00
commit 45d5ab30ff
2 changed files with 7 additions and 0 deletions

View file

@ -284,6 +284,7 @@ func getHeadscaleConfig() headscale.Config {
return headscale.Config{
ServerURL: viper.GetString("server_url"),
Addr: viper.GetString("listen_addr"),
MetricsAddr: viper.GetString("metrics_listen_addr"),
GRPCAddr: viper.GetString("grpc_listen_addr"),
GRPCAllowInsecure: viper.GetBool("grpc_allow_insecure"),

View file

@ -16,6 +16,12 @@ server_url: http://127.0.0.1:8080
#
listen_addr: 0.0.0.0:8080
# Address to listen to /metrics, you may want
# to keep this endpoint private to your internal
# network
#
metrics_listen_addr: 127.0.0.1:8081
# Address to listen for gRPC.
# gRPC is used for controlling a headscale server
# remotely with the CLI