Skip to content

Commit

Permalink
Added a new input plugin t128_eventcollector
Browse files Browse the repository at this point in the history
WAN-2321 #time 1h
  • Loading branch information
shriyanshk128T committed Aug 29, 2023
1 parent 0c6f5c6 commit 39f4427
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions plugins/inputs/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ import (
_ "github.com/influxdata/telegraf/plugins/inputs/sysstat"
_ "github.com/influxdata/telegraf/plugins/inputs/system"
_ "github.com/influxdata/telegraf/plugins/inputs/systemd_units"
_ "github.com/influxdata/telegraf/plugins/inputs/t128_eventcollector"
_ "github.com/influxdata/telegraf/plugins/inputs/t128_graphql"
_ "github.com/influxdata/telegraf/plugins/inputs/t128_metrics"
_ "github.com/influxdata/telegraf/plugins/inputs/tail"
Expand Down
15 changes: 9 additions & 6 deletions plugins/inputs/t128_eventcollector/t128_eventcollector.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ import (
"fmt"

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

// T128EventCollector is an input for metrics of a 128T router instance
type T128EventCollector struct {
CollectorName string `toml:"collector_name"`
LogName string `toml:"log_name"`
Topic string `toml:"topic"`
IndexFile string `toml:"index_file"`
EventType string `toml:"event_type"`
CollectorName string `toml:"collector_name"`
LogName string `toml:"log_name"`
Topic string `toml:"topic"`
IndexFile string `toml:"index_file"`
EventType string `toml:"event_type"`
Timeout config.Duration `toml:"timeout"`
}

var sampleConfig = `
Expand Down Expand Up @@ -41,7 +44,7 @@ func (*T128EventCollector) SampleConfig() string {
return sampleConfig
}

// Description returns a one-sentence description on the Input
// Description returns a one-sentence description of the Input
func (*T128EventCollector) Description() string {
return "Read 128T Event Collector"
}
Expand Down
Empty file.

0 comments on commit 39f4427

Please sign in to comment.