diff --git a/cmd/influxd/config.go b/cmd/influxd/config.go index e1ace8a5c6..aacae6f468 100644 --- a/cmd/influxd/config.go +++ b/cmd/influxd/config.go @@ -179,6 +179,7 @@ type Config struct { Snapshot Snapshot `toml:"snapshot"` Logging struct { + HTTPAccess bool `toml:"http-access"` WriteTracing bool `toml:"write-tracing"` RaftTracing bool `toml:"raft-tracing"` } `toml:"logging"` @@ -238,6 +239,10 @@ func NewConfig() *Config { c.Data.RetentionCheckPeriod = Duration(DefaultRetentionCheckPeriod) c.Data.RetentionCreatePeriod = Duration(DefaultRetentionCreatePeriod) + c.Logging.HTTPAccess = true + c.Logging.WriteTracing = false + c.Logging.RaftTracing = false + c.Monitoring.Enabled = false c.Monitoring.WriteInterval = Duration(DefaultStatisticsWriteInterval) c.ContinuousQuery.RecomputePreviousN = DefaultContinuousQueryRecomputePreviousN diff --git a/cmd/influxd/handler.go b/cmd/influxd/handler.go index db0c64c4ba..a0cec1ccda 100644 --- a/cmd/influxd/handler.go +++ b/cmd/influxd/handler.go @@ -104,6 +104,7 @@ func (h *Handler) serveData(w http.ResponseWriter, r *http.Request) { sh := httpd.NewClusterHandler(h.Server, h.Config.Authentication.Enabled, h.Config.Snapshot.Enabled, version) sh.WriteTrace = h.Config.Logging.WriteTracing + sh.HTTPAccessLogging = h.Config.Logging.HTTPAccess sh.ServeHTTP(w, r) return } diff --git a/cmd/influxd/server_integration_test.go b/cmd/influxd/server_integration_test.go index 1446aafabf..932e352dcb 100644 --- a/cmd/influxd/server_integration_test.go +++ b/cmd/influxd/server_integration_test.go @@ -1426,7 +1426,6 @@ func Test3NodeServerFailover(t *testing.T) { // ensure that all queries work if there are more nodes in a cluster than the replication factor func Test3NodeClusterPartiallyReplicated(t *testing.T) { - t.Skip("Skipping due to instability") testName := "3-node server integration partial replication" if testing.Short() { t.Skip(fmt.Sprintf("skipping '%s'", testName)) diff --git a/httpd/handler.go b/httpd/handler.go index 9e23885369..300d8bed96 100644 --- a/httpd/handler.go +++ b/httpd/handler.go @@ -53,8 +53,9 @@ type Handler struct { snapshotEnabled bool version string - Logger *log.Logger - WriteTrace bool // Detailed logging of write path + Logger *log.Logger + HTTPAccessLogging bool // Log every HTTP access. + WriteTrace bool // Detailed logging of write path } // NewClusterHandler is the http handler for cluster communication endpoints @@ -169,7 +170,7 @@ func (h *Handler) SetRoutes(routes []route) { handler = versionHeader(handler, h.version) handler = cors(handler) handler = requestID(handler) - if r.log { + if h.HTTPAccessLogging && r.log { handler = logging(handler, r.name, h.Logger) } handler = recovery(handler, r.name, h.Logger) // make sure recovery is always last