diff --git a/CHANGELOG.md b/CHANGELOG.md index f389b58a1..8dd19fab6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ specifying a docker endpoint to get metrics from. - [#285](https://github.com/influxdata/telegraf/issues/285): Fixed-size buffer of points. - [#546](https://github.com/influxdata/telegraf/pull/546): SNMP Input plugin. Thanks @titilambert! - [#589](https://github.com/influxdata/telegraf/pull/589): Microsoft SQL Server input plugin. Thanks @zensqlmonitor! +- [#573](https://github.com/influxdata/telegraf/pull/573): Github webhooks consumer input. Thanks @jackzampolin! ### Bugfixes - [#506](https://github.com/influxdata/telegraf/pull/506): Ping input doesn't return response time metric when timeout. Thanks @titilambert! diff --git a/README.md b/README.md index 68864ac7e..59e987247 100644 --- a/README.md +++ b/README.md @@ -183,6 +183,7 @@ Telegraf can also collect metrics via the following service plugins: * statsd * kafka_consumer +* github_webhooks We'll be adding support for many more over the coming months. Read on if you want to add support for another service or third-party API. diff --git a/plugins/inputs/github_webhooks/github_webhooks.go b/plugins/inputs/github_webhooks/github_webhooks.go index 0663c9dea..f764a5136 100644 --- a/plugins/inputs/github_webhooks/github_webhooks.go +++ b/plugins/inputs/github_webhooks/github_webhooks.go @@ -17,8 +17,7 @@ func init() { } type GithubWebhooks struct { - ServiceAddress string - MeasurementName string + ServiceAddress string // Lock for the struct sync.Mutex // Events buffer to store events between Gather calls @@ -33,8 +32,6 @@ func (gh *GithubWebhooks) SampleConfig() string { return ` # Address and port to host Webhook listener on service_address = ":1618" - # Measurement name - measurement_name = "github_webhooks" ` } @@ -48,7 +45,7 @@ func (gh *GithubWebhooks) Gather(acc inputs.Accumulator) error { defer gh.Unlock() for _, event := range gh.events { p := event.NewPoint() - acc.AddFields(gh.MeasurementName, p.Fields(), p.Tags(), p.Time()) + acc.AddFields("github_webhooks", p.Fields(), p.Tags(), p.Time()) } gh.events = make([]Event, 0) return nil