Update changelog and readme, and small tweaks to github_webhooks
This commit is contained in:
parent
7e7e462de1
commit
c10227a766
|
@ -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!
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue