Skip to content

Commit

Permalink
default metric host (zeromicro#196)
Browse files Browse the repository at this point in the history
Co-authored-by: zhoushuguang <zhoushuguang@xiaoheiban.cn>
  • Loading branch information
zhoushuguang and zhoushuguang authored Nov 9, 2020
1 parent f32c6a9 commit d629acc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/prometheus/config.go
Original file line number Diff line number Diff line change
@@ -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"`
}
6 changes: 3 additions & 3 deletions core/service/serviceconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit d629acc

Please sign in to comment.