diff --git a/core/prometheus/config.go b/core/prometheus/config.go index 5c1cfc83..29887bbd 100644 --- a/core/prometheus/config.go +++ b/core/prometheus/config.go @@ -1,7 +1,7 @@ package prometheus type Config struct { - Host string `json:",default=127.0.0.1"` + Host string `json:",optional"` Port int `json:",default=9101"` Path string `json:",default=/metrics"` } diff --git a/core/service/serviceconf.go b/core/service/serviceconf.go index 89bdb51f..f45f05ad 100644 --- a/core/service/serviceconf.go +++ b/core/service/serviceconf.go @@ -19,9 +19,9 @@ const ( type ServiceConf struct { Name string Log logx.LogConf - Mode string `json:",default=pro,options=dev|test|pre|pro"` - MetricsUrl string `json:",optional"` - Prometheus prometheus.Config + Mode string `json:",default=pro,options=dev|test|pre|pro"` + MetricsUrl string `json:",optional"` + Prometheus prometheus.Config `json:",optional"` } func (sc ServiceConf) MustSetUp() {