Update docs and changelog for github input
This commit is contained in:
parent
0a68c8468b
commit
1bcbc3eea7
|
@ -1,5 +1,9 @@
|
||||||
## v1.11 [unreleased]
|
## v1.11 [unreleased]
|
||||||
|
|
||||||
|
#### New Inputs
|
||||||
|
|
||||||
|
- [github](/plugins/inputs/github/README.md) - Contributed by @influxdata
|
||||||
|
|
||||||
#### Features
|
#### Features
|
||||||
|
|
||||||
- [#5556](https://github.com/influxdata/telegraf/pull/5556): Add TTL field to ping input.
|
- [#5556](https://github.com/influxdata/telegraf/pull/5556): Add TTL field to ping input.
|
||||||
|
|
|
@ -168,6 +168,7 @@ For documentation on the latest development code see the [documentation index][d
|
||||||
* [filestat](./plugins/inputs/filestat)
|
* [filestat](./plugins/inputs/filestat)
|
||||||
* [filecount](./plugins/inputs/filecount)
|
* [filecount](./plugins/inputs/filecount)
|
||||||
* [fluentd](./plugins/inputs/fluentd)
|
* [fluentd](./plugins/inputs/fluentd)
|
||||||
|
* [github](./plugins/inputs/github)
|
||||||
* [graylog](./plugins/inputs/graylog)
|
* [graylog](./plugins/inputs/graylog)
|
||||||
* [haproxy](./plugins/inputs/haproxy)
|
* [haproxy](./plugins/inputs/haproxy)
|
||||||
* [hddtemp](./plugins/inputs/hddtemp)
|
* [hddtemp](./plugins/inputs/hddtemp)
|
||||||
|
|
|
@ -43,6 +43,8 @@ following works:
|
||||||
- github.com/golang/protobuf [BSD 3-Clause "New" or "Revised" License](https://github.com/golang/protobuf/blob/master/LICENSE)
|
- github.com/golang/protobuf [BSD 3-Clause "New" or "Revised" License](https://github.com/golang/protobuf/blob/master/LICENSE)
|
||||||
- github.com/golang/snappy [BSD 3-Clause "New" or "Revised" License](https://github.com/golang/snappy/blob/master/LICENSE)
|
- github.com/golang/snappy [BSD 3-Clause "New" or "Revised" License](https://github.com/golang/snappy/blob/master/LICENSE)
|
||||||
- github.com/google/go-cmp [BSD 3-Clause "New" or "Revised" License](https://github.com/google/go-cmp/blob/master/LICENSE)
|
- github.com/google/go-cmp [BSD 3-Clause "New" or "Revised" License](https://github.com/google/go-cmp/blob/master/LICENSE)
|
||||||
|
- github.com/google/go-github [BSD 3-Clause "New" or "Revised" License](https://github.com/google/go-github/blob/master/LICENSE)
|
||||||
|
- github.com/google/go-querystring [BSD 3-Clause "New" or "Revised" License](https://github.com/google/go-querystring/blob/master/LICENSE)
|
||||||
- github.com/google/uuid [BSD 3-Clause "New" or "Revised" License](https://github.com/google/uuid/blob/master/LICENSE)
|
- github.com/google/uuid [BSD 3-Clause "New" or "Revised" License](https://github.com/google/uuid/blob/master/LICENSE)
|
||||||
- github.com/googleapis/gax-go [BSD 3-Clause "New" or "Revised" License](https://github.com/googleapis/gax-go/blob/master/LICENSE)
|
- github.com/googleapis/gax-go [BSD 3-Clause "New" or "Revised" License](https://github.com/googleapis/gax-go/blob/master/LICENSE)
|
||||||
- github.com/gorilla/context [BSD 3-Clause "New" or "Revised" License](https://github.com/gorilla/context/blob/master/LICENSE)
|
- github.com/gorilla/context [BSD 3-Clause "New" or "Revised" License](https://github.com/gorilla/context/blob/master/LICENSE)
|
||||||
|
|
|
@ -1,47 +1,55 @@
|
||||||
# GitHub Input Plugin
|
# GitHub Input Plugin
|
||||||
|
|
||||||
The [GitHub](https://www.github.com) input plugin gathers statistics from GitHub repositories.
|
Gather repository information from [GitHub][] hosted repositories.
|
||||||
|
|
||||||
### Configuration:
|
**Note:** Telegraf also contains the [webhook][] input which can be used as an
|
||||||
|
alternative method for collecting repository information.
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[[inputs.github]]
|
[[inputs.github]]
|
||||||
## List of repositories to monitor
|
## List of repositories to monitor
|
||||||
## ex: repositories = ["influxdata/telegraf"]
|
repositories = ["influxdata/telegraf"]
|
||||||
# repositories = []
|
|
||||||
|
|
||||||
## Optional: Unauthenticated requests are limited to 60 per hour.
|
## Github API access token. Unauthenticated requests are limited to 60 per hour.
|
||||||
# access_token = ""
|
# access_token = ""
|
||||||
|
|
||||||
## Optional: Default 5s.
|
## Timeout for HTTP requests.
|
||||||
# http_timeout = "5s"
|
# http_timeout = "5s"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Metrics:
|
### Metrics
|
||||||
|
|
||||||
- github_repository
|
- github_repository
|
||||||
- tags:
|
- tags:
|
||||||
- `name` - The repository name
|
- name - The repository name
|
||||||
- `owner` - The owner of the repository
|
- owner - The owner of the repository
|
||||||
- `language` - The primary language of the repository
|
- language - The primary language of the repository
|
||||||
- `license` - The license set for the repository
|
- license - The license set for the repository
|
||||||
- fields:
|
- fields:
|
||||||
- `stars` (int)
|
- stars (int)
|
||||||
- `forks` (int)
|
- forks (int)
|
||||||
- `open_issues` (int)
|
- open_issues (int)
|
||||||
- `size` (int)
|
- size (int)
|
||||||
|
|
||||||
* github_rate_limit
|
When the [internal][] input is enabled:
|
||||||
|
|
||||||
|
+ internal_github
|
||||||
- tags:
|
- tags:
|
||||||
- `access_token` - An obfusticated reference to the configured access token or "Unauthenticated"
|
- access_token - An obfusticated reference to the configured access token or "Unauthenticated"
|
||||||
- fields:
|
- fields:
|
||||||
- `limit` - How many requests you are limited to (per hour)
|
- limit - How many requests you are limited to (per hour)
|
||||||
- `remaining` - How many requests you have remaining (per hour)
|
- remaining - How many requests you have remaining (per hour)
|
||||||
- `blocks` - How many requests have been blocked due to rate limit
|
- blocks - How many requests have been blocked due to rate limit
|
||||||
|
|
||||||
### Example Output:
|
### Example Output
|
||||||
|
|
||||||
```
|
```
|
||||||
github,full_name=influxdata/telegraf,name=telegraf,owner=influxdata,language=Go,license=MIT\ License stars=6401i,forks=2421i,open_issues=722i,size=22611i 1552651811000000000
|
github,full_name=influxdata/telegraf,name=telegraf,owner=influxdata,language=Go,license=MIT\ License stars=6401i,forks=2421i,open_issues=722i,size=22611i 1552651811000000000
|
||||||
internal_github,access_token=Unauthenticated rate_limit_remaining=59i,rate_limit_limit=60i,rate_limit_blocks=0i 1552653551000000000
|
internal_github,access_token=Unauthenticated rate_limit_remaining=59i,rate_limit_limit=60i,rate_limit_blocks=0i 1552653551000000000
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[GitHub]: https://www.github.com
|
||||||
|
[internal]: /plugins/inputs/internal
|
||||||
|
[webhook]: /plugins/inputs/webhooks/github
|
||||||
|
|
|
@ -31,14 +31,13 @@ type GitHub struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
const sampleConfig = `
|
const sampleConfig = `
|
||||||
## List of repositories to monitor
|
## List of repositories to monitor.
|
||||||
## ex: repositories = ["influxdata/telegraf"]
|
repositories = ["influxdata/telegraf"]
|
||||||
# repositories = []
|
|
||||||
|
|
||||||
## Optional: Unauthenticated requests are limited to 60 per hour.
|
## Github API access token. Unauthenticated requests are limited to 60 per hour.
|
||||||
# access_token = ""
|
# access_token = ""
|
||||||
|
|
||||||
## Optional: Default 5s.
|
## Timeout for HTTP requests.
|
||||||
# http_timeout = "5s"
|
# http_timeout = "5s"
|
||||||
`
|
`
|
||||||
|
|
||||||
|
@ -49,7 +48,7 @@ func (g *GitHub) SampleConfig() string {
|
||||||
|
|
||||||
// Description returns the plugin description.
|
// Description returns the plugin description.
|
||||||
func (g *GitHub) Description() string {
|
func (g *GitHub) Description() string {
|
||||||
return "Read repository information from GitHub, including forks, stars, and more."
|
return "Gather repository information from GitHub hosted repositories."
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create GitHub Client
|
// Create GitHub Client
|
||||||
|
|
Loading…
Reference in New Issue