diff --git a/cadvisor.go b/cadvisor.go index 84ae1544..fcf248ba 100644 --- a/cadvisor.go +++ b/cadvisor.go @@ -34,7 +34,7 @@ import ( var argPort = flag.Int("port", 8080, "port to listen") var maxProcs = flag.Int("max_procs", 0, "max number of CPUs that can be used simultaneously. Less than 1 for default (number of cores).") -var argDbDriver = flag.String("storage_driver", "memory", "storage driver to use. Options are: memory (default), bigquery, and influxdb") +var argDbDriver = flag.String("storage_driver", "", "storage driver to use. Empty means none. Options are: (default), bigquery, and influxdb") func main() { flag.Parse() diff --git a/storagedriver.go b/storagedriver.go index 0009e96a..ea0c94bb 100644 --- a/storagedriver.go +++ b/storagedriver.go @@ -49,6 +49,8 @@ func NewStorageDriver(driverName string) (*memory.InMemoryStorage, error) { samplesToCache = statsRequestedByUI } switch driverName { + case "": + backendStorage = nil case "influxdb": var hostname string hostname, err = os.Hostname() @@ -87,7 +89,7 @@ func NewStorageDriver(driverName string) (*memory.InMemoryStorage, error) { if err != nil { return nil, err } - glog.Infof("Caching %d recent stats in memory; using %v storage driver\n", samplesToCache, driverName) + glog.Infof("Caching %d recent stats in memory; using \"%v\" storage driver\n", samplesToCache, driverName) storageDriver = memory.New(samplesToCache, samplesToCache, backendStorage) return storageDriver, nil }