move plugin interfaces into separate package
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/influxdata/telegraf"
|
||||
"github.com/influxdata/telegraf/plugins"
|
||||
"github.com/influxdata/telegraf/plugins/inputs"
|
||||
"golang.org/x/net/html/charset"
|
||||
)
|
||||
@@ -145,7 +145,7 @@ func (r *passenger) Description() string {
|
||||
return "Read metrics of passenger using passenger-status"
|
||||
}
|
||||
|
||||
func (g *passenger) Gather(acc telegraf.Accumulator) error {
|
||||
func (g *passenger) Gather(acc plugins.Accumulator) error {
|
||||
if g.Command == "" {
|
||||
g.Command = "passenger-status -v --show=xml"
|
||||
}
|
||||
@@ -164,7 +164,7 @@ func (g *passenger) Gather(acc telegraf.Accumulator) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func importMetric(stat []byte, acc telegraf.Accumulator) error {
|
||||
func importMetric(stat []byte, acc plugins.Accumulator) error {
|
||||
var p info
|
||||
|
||||
decoder := xml.NewDecoder(bytes.NewReader(stat))
|
||||
@@ -244,7 +244,7 @@ func importMetric(stat []byte, acc telegraf.Accumulator) error {
|
||||
}
|
||||
|
||||
func init() {
|
||||
inputs.Add("passenger", func() telegraf.Input {
|
||||
inputs.Add("passenger", func() plugins.Input {
|
||||
return &passenger{}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user