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{ return headscale.Config{
ServerURL: viper.GetString("server_url"), ServerURL: viper.GetString("server_url"),
Addr: viper.GetString("listen_addr"), Addr: viper.GetString("listen_addr"),
MetricsAddr: viper.GetString("metrics_listen_addr"),
GRPCAddr: viper.GetString("grpc_listen_addr"), GRPCAddr: viper.GetString("grpc_listen_addr"),
GRPCAllowInsecure: viper.GetBool("grpc_allow_insecure"), 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 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. # Address to listen for gRPC.
# gRPC is used for controlling a headscale server # gRPC is used for controlling a headscale server
# remotely with the CLI # remotely with the CLI