add start metrics server

This commit is contained in:
Konstantin Lebedev
2020-09-24 17:45:39 +05:00
parent 3e52329cee
commit 324e44d4b3
7 changed files with 33 additions and 8 deletions

View File

@@ -36,7 +36,7 @@ type FilerOptions struct {
disableHttp *bool
cipher *bool
peers *string
metricsHttpPort *int
// default leveldb directory, used in "weed server" mode
defaultLevelDbDirectory *string
}
@@ -57,6 +57,7 @@ func init() {
f.disableHttp = cmdFiler.Flag.Bool("disableHttp", false, "disable http request, only gRpc operations are allowed")
f.cipher = cmdFiler.Flag.Bool("encryptVolumeData", false, "encrypt data on volume servers")
f.peers = cmdFiler.Flag.String("peers", "", "all filers sharing the same filer store in comma separated ip:port list")
f.metricsHttpPort = cmdFiler.Flag.Int("metricsPort", 0, "Prometheus metrics listen port")
}
var cmdFiler = &Command{
@@ -122,6 +123,7 @@ func (fo *FilerOptions) startFiler() {
Port: uint32(*fo.port),
Cipher: *fo.cipher,
Filers: peers,
MetricsHttpPort: *fo.metricsHttpPort,
})
if nfs_err != nil {
glog.Fatalf("Filer startup error: %v", nfs_err)