Initialize the admin interface on startup.

pull/1565/head
Todd Persen 2015-02-10 23:03:23 -08:00
parent 631f2946ff
commit 4cdda0ba31
1 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,7 @@ import (
"strings"
"github.com/influxdb/influxdb"
"github.com/influxdb/influxdb/admin"
"github.com/influxdb/influxdb/collectd"
"github.com/influxdb/influxdb/graphite"
"github.com/influxdb/influxdb/httpd"
@ -70,6 +71,11 @@ 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()
// Spin up the collectd server
if config.Collectd.Enabled {
c := config.Collectd
@ -80,6 +86,7 @@ func Run(config *Config, join, version string, logWriter *os.File) (*messaging.B
log.Printf("failed to start collectd Server: %v\n", err.Error())
}
}
// Spin up any Graphite servers
for _, c := range config.Graphites {
if !c.Enabled {