Postgresql_extensible, ran fmt

This commit is contained in:
Thomas Menard 2016-03-07 11:25:26 +01:00
parent 55a47c6a19
commit d43aeed4cc
2 changed files with 12 additions and 12 deletions

View File

@ -18,7 +18,7 @@ type Postgresql struct {
OrderedColumns []string OrderedColumns []string
AllColumns []string AllColumns []string
AdditionalTags []string AdditionalTags []string
Query []struct { Query []struct {
Sqlquery string Sqlquery string
Version int Version int
Withdbname bool Withdbname bool
@ -27,10 +27,10 @@ type Postgresql struct {
} }
type query []struct { type query []struct {
Sqlquery string Sqlquery string
Version int Version int
Withdbname bool Withdbname bool
Tagvalue string Tagvalue string
} }
var ignoredColumns = map[string]bool{"datid": true, "datname": true, "stats_reset": true} var ignoredColumns = map[string]bool{"datid": true, "datname": true, "stats_reset": true}

View File

@ -19,11 +19,11 @@ func TestPostgresqlGeneratesMetrics(t *testing.T) {
testutil.GetLocalHost()), testutil.GetLocalHost()),
Databases: []string{"postgres"}, Databases: []string{"postgres"},
Query: query{ Query: query{
{Sqlquery: "select * from pg_stat_database", {Sqlquery: "select * from pg_stat_database",
Version: 901, Version: 901,
Withdbname: false, Withdbname: false,
Tagvalue: ""}, Tagvalue: ""},
}, },
} }
var acc testutil.Accumulator var acc testutil.Accumulator
err := p.Gather(&acc) err := p.Gather(&acc)