Skip to content

Commit

Permalink
Fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Yudin committed Jan 29, 2016
1 parent 6a6db34 commit 6591b6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions plugins/inputs/powerdns/powerdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"strings"
"time"

"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins/inputs"
)

Expand All @@ -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)
}
Expand All @@ -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
Expand Down Expand Up @@ -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{}
})
}
2 changes: 1 addition & 1 deletion plugins/inputs/powerdns/powerdns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 6591b6b

Please sign in to comment.