Skip to content

Commit

Permalink
Update changelog and readme, and small tweaks to github_webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Jan 26, 2016
1 parent 7e7e462 commit c10227a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 2 additions & 5 deletions plugins/inputs/github_webhooks/github_webhooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
`
}

Expand All @@ -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
Expand Down

0 comments on commit c10227a

Please sign in to comment.