Merge pull request #91 from monnand/rm-influxdb
Remove support for influxdb until influxdb/influxdb#756 get fixed
This commit is contained in:
commit
b1d9996cca
@ -12,6 +12,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
// +build ignore
|
||||||
|
|
||||||
package influxdb
|
package influxdb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -22,7 +24,7 @@ import (
|
|||||||
|
|
||||||
"github.com/google/cadvisor/info"
|
"github.com/google/cadvisor/info"
|
||||||
"github.com/google/cadvisor/storage"
|
"github.com/google/cadvisor/storage"
|
||||||
"github.com/influxdb/influxdb-go"
|
"github.com/influxdb/influxdb/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type influxdbStorage struct {
|
type influxdbStorage struct {
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
// +build ignore
|
||||||
|
|
||||||
package influxdb
|
package influxdb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -21,7 +23,7 @@ import (
|
|||||||
|
|
||||||
"github.com/google/cadvisor/storage"
|
"github.com/google/cadvisor/storage"
|
||||||
"github.com/google/cadvisor/storage/test"
|
"github.com/google/cadvisor/storage/test"
|
||||||
"github.com/influxdb/influxdb-go"
|
"github.com/influxdb/influxdb/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
func runStorageTest(f func(storage.StorageDriver, *testing.T), t *testing.T) {
|
func runStorageTest(f func(storage.StorageDriver, *testing.T), t *testing.T) {
|
||||||
|
@ -17,11 +17,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/google/cadvisor/storage"
|
"github.com/google/cadvisor/storage"
|
||||||
"github.com/google/cadvisor/storage/influxdb"
|
|
||||||
"github.com/google/cadvisor/storage/memory"
|
"github.com/google/cadvisor/storage/memory"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -43,24 +40,26 @@ func NewStorageDriver(driverName string) (storage.StorageDriver, error) {
|
|||||||
case "memory":
|
case "memory":
|
||||||
storageDriver = memory.New(*argSampleSize, *argHistoryDuration)
|
storageDriver = memory.New(*argSampleSize, *argHistoryDuration)
|
||||||
return storageDriver, nil
|
return storageDriver, nil
|
||||||
case "influxdb":
|
/*
|
||||||
var hostname string
|
case "influxdb":
|
||||||
hostname, err = os.Hostname()
|
var hostname string
|
||||||
if err != nil {
|
hostname, err = os.Hostname()
|
||||||
return nil, err
|
if err != nil {
|
||||||
}
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
storageDriver, err = influxdb.New(
|
storageDriver, err = influxdb.New(
|
||||||
hostname,
|
hostname,
|
||||||
"cadvisorTable",
|
"cadvisorTable",
|
||||||
*argDbName,
|
*argDbName,
|
||||||
*argDbUsername,
|
*argDbUsername,
|
||||||
*argDbPassword,
|
*argDbPassword,
|
||||||
*argDbHost,
|
*argDbHost,
|
||||||
*argDbIsSecure,
|
*argDbIsSecure,
|
||||||
// TODO(monnand): One hour? Or user-defined?
|
// TODO(monnand): One hour? Or user-defined?
|
||||||
1*time.Hour,
|
1*time.Hour,
|
||||||
)
|
)
|
||||||
|
*/
|
||||||
default:
|
default:
|
||||||
err = fmt.Errorf("Unknown database driver: %v", *argDbDriver)
|
err = fmt.Errorf("Unknown database driver: %v", *argDbDriver)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user