Fix admin configuration.
parent
8bb95cb151
commit
286c9a9635
|
@ -59,7 +59,6 @@ type Config struct {
|
|||
|
||||
Admin struct {
|
||||
Port int `toml:"port"`
|
||||
Assets string `toml:"assets"`
|
||||
} `toml:"admin"`
|
||||
|
||||
HTTPAPI struct {
|
||||
|
|
|
@ -56,8 +56,6 @@ func TestParseConfig(t *testing.T) {
|
|||
|
||||
if c.Admin.Port != 8083 {
|
||||
t.Fatalf("admin port mismatch: %v", c.Admin.Port)
|
||||
} else if c.Admin.Assets != "./admin" {
|
||||
t.Fatalf("admin assets mismatch: %v", c.Admin.Assets)
|
||||
}
|
||||
|
||||
if c.Data.Port != main.DefaultBrokerPort {
|
||||
|
|
|
@ -71,10 +71,12 @@ func Run(config *Config, join, version string, logWriter *os.File) (*messaging.B
|
|||
}
|
||||
log.Printf("data node #%d listening on %s", s.ID(), config.DataAddr())
|
||||
|
||||
// Start the admin interface on the default port
|
||||
log.Printf("starting admin server on :8083")
|
||||
a := admin.NewHttpServer(":8083")
|
||||
go a.ListenAndServe()
|
||||
// Start the admin interface on the default port
|
||||
if config.Admin.Port > 0 {
|
||||
log.Printf("starting admin server on :8083")
|
||||
a := admin.NewHttpServer(":8083")
|
||||
go a.ListenAndServe()
|
||||
}
|
||||
|
||||
// Spin up the collectd server
|
||||
if config.Collectd.Enabled {
|
||||
|
|
|
@ -34,7 +34,7 @@ port = 8083 # binding is disabled if the port isn't set
|
|||
|
||||
# Configure the HTTP API endpoint. All time-series data and queries uses this endpoint.
|
||||
[api]
|
||||
# ssl-port = 8084 # SSL support is enabled if you set a port and cert
|
||||
# ssl-port = 8087 # SSL support is enabled if you set a port and cert
|
||||
# ssl-cert = "/path/to/cert.pem"
|
||||
|
||||
# Configure the Graphite plugins.
|
||||
|
|
Loading…
Reference in New Issue