diff --git a/plugins/inputs/powerdns/powerdns.go b/plugins/inputs/powerdns/powerdns.go index 6c0c6882d..0203d916e 100644 --- a/plugins/inputs/powerdns/powerdns.go +++ b/plugins/inputs/powerdns/powerdns.go @@ -9,6 +9,7 @@ import ( "strings" "time" + "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/plugins/inputs" ) @@ -34,7 +35,7 @@ func (p *Powerdns) Description() string { return "Read metrics from one or many PowerDNS servers" } -func (p *Powerdns) Gather(acc inputs.Accumulator) error { +func (p *Powerdns) Gather(acc telegraf.Accumulator) error { if len(p.UnixSockets) == 0 { return p.gatherServer("/var/run/pdns.controlsocket", acc) } @@ -48,7 +49,7 @@ func (p *Powerdns) Gather(acc inputs.Accumulator) error { return nil } -func (p *Powerdns) gatherServer(address string, acc inputs.Accumulator) error { +func (p *Powerdns) gatherServer(address string, acc telegraf.Accumulator) error { conn, err := net.DialTimeout("unix", address, defaultTimeout) if err != nil { return err @@ -119,7 +120,7 @@ func parseResponse(metrics string) (map[string]interface{}, error) { } func init() { - inputs.Add("powerdns", func() inputs.Input { + inputs.Add("powerdns", func() telegraf.Input { return &Powerdns{} }) } diff --git a/plugins/inputs/powerdns/powerdns_test.go b/plugins/inputs/powerdns/powerdns_test.go index 9d44b02bb..2bd3d52c8 100644 --- a/plugins/inputs/powerdns/powerdns_test.go +++ b/plugins/inputs/powerdns/powerdns_test.go @@ -131,7 +131,7 @@ func TestPowerdnsParseMetrics(t *testing.T) { continue } if value != test.value { - t.Errorf("Metric: %s, Expected: %s, actual: %s", + t.Errorf("Metric: %s, Expected: %d, actual: %d", test.key, test.value, value) } }