default metric host (#196)

Co-authored-by: zhoushuguang <zhoushuguang@xiaoheiban.cn>
master
zhoushuguang 4 years ago committed by GitHub
parent f32c6a9b28
commit d629acc2b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,7 +1,7 @@
package prometheus
type Config struct {
Host string `json:",optional"`
Host string `json:",default=127.0.0.1"`
Port int `json:",default=9101"`
Path string `json:",default=/metrics"`
}

@ -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 `json:",optional"`
Mode string `json:",default=pro,options=dev|test|pre|pro"`
MetricsUrl string `json:",optional"`
Prometheus prometheus.Config
}
func (sc ServiceConf) MustSetUp() {

Loading…
Cancel
Save