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.
|
- [#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!
|
- [#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!
|
- [#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
|
### Bugfixes
|
||||||
- [#506](https://github.com/influxdata/telegraf/pull/506): Ping input doesn't return response time metric when timeout. Thanks @titilambert!
|
- [#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
|
* statsd
|
||||||
* kafka_consumer
|
* kafka_consumer
|
||||||
|
* github_webhooks
|
||||||
|
|
||||||
We'll be adding support for many more over the coming months. Read on if you
|
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.
|
want to add support for another service or third-party API.
|
||||||
|
|
|
@ -18,7 +18,6 @@ func init() {
|
||||||
|
|
||||||
type GithubWebhooks struct {
|
type GithubWebhooks struct {
|
||||||
ServiceAddress string
|
ServiceAddress string
|
||||||
MeasurementName string
|
|
||||||
// Lock for the struct
|
// Lock for the struct
|
||||||
sync.Mutex
|
sync.Mutex
|
||||||
// Events buffer to store events between Gather calls
|
// Events buffer to store events between Gather calls
|
||||||
|
@ -33,8 +32,6 @@ func (gh *GithubWebhooks) SampleConfig() string {
|
||||||
return `
|
return `
|
||||||
# Address and port to host Webhook listener on
|
# Address and port to host Webhook listener on
|
||||||
service_address = ":1618"
|
service_address = ":1618"
|
||||||
# Measurement name
|
|
||||||
measurement_name = "github_webhooks"
|
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +45,7 @@ func (gh *GithubWebhooks) Gather(acc inputs.Accumulator) error {
|
||||||
defer gh.Unlock()
|
defer gh.Unlock()
|
||||||
for _, event := range gh.events {
|
for _, event := range gh.events {
|
||||||
p := event.NewPoint()
|
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)
|
gh.events = make([]Event, 0)
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue