Create experimental directory for inputs & outputs
This commit is contained in:
parent
e963b7f01b
commit
67483c85a5
|
@ -1,18 +1,19 @@
|
||||||
## Steps for Contributing:
|
## Steps for Contributing:
|
||||||
|
|
||||||
1. [Sign the CLA](http://influxdb.com/community/cla.html)
|
1. [Sign the CLA](http://influxdb.com/community/cla.html)
|
||||||
1. Make changes or write plugin (see below for details)
|
1. If you are adding a new plugin:
|
||||||
1. Add your plugin to `plugins/inputs/all/all.go` or `plugins/outputs/all/all.go`
|
1. All new plugins must go into the `experimental` directory: `plugins/experimental/inputs/` or `plugins/experimental/outputs/`
|
||||||
1. If your plugin requires a new Go package,
|
1. Add your plugin to `plugins/experimental/inputs/all/all.go` or `plugins/experimental/outputs/all/all.go`
|
||||||
[add it](https://github.com/influxdata/telegraf/blob/master/CONTRIBUTING.md#adding-a-dependency)
|
1. If your plugin requires a new Go package, [add it](https://github.com/influxdata/telegraf/blob/master/CONTRIBUTING.md#adding-a-dependency)
|
||||||
1. Write a README for your plugin, if it's an input plugin, it should be structured
|
1. Write a README for your plugin, if it's an input plugin, it should be structured
|
||||||
like the [input example here](https://github.com/influxdata/telegraf/blob/master/plugins/inputs/EXAMPLE_README.md).
|
like the [input example here](https://github.com/influxdata/telegraf/blob/master/plugins/inputs/EXAMPLE_README.md).
|
||||||
Output plugins READMEs are less structured,
|
Output plugins READMEs are less structured,
|
||||||
but any information you can provide on how the data will look is appreciated.
|
but any information you can provide on how the data will look is appreciated.
|
||||||
See the [OpenTSDB output](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/opentsdb)
|
See the [OpenTSDB output](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/opentsdb)
|
||||||
for a good example.
|
for a good example. All plugin READMEs must include links to relevant
|
||||||
1. **Optional:** Help users of your plugin by including example queries for populating dashboards. Include these sample queries in the `README.md` for the plugin.
|
documentation.
|
||||||
1. **Optional:** Write a [tickscript](https://docs.influxdata.com/kapacitor/v1.0/tick/syntax/) for your plugin and add it to [Kapacitor](https://github.com/influxdata/kapacitor/tree/master/examples/telegraf). Or mention @jackzampolin in a PR comment with some common queries that you would want to alert on and he will write one for you.
|
1. **Optional:** Help users of your plugin by including example queries for populating dashboards. Include these sample queries in the `README.md` for the plugin.
|
||||||
|
1. **Optional:** Write a [tickscript](https://docs.influxdata.com/kapacitor/v1.0/tick/syntax/) for your plugin and add it to [Kapacitor](https://github.com/influxdata/kapacitor/tree/master/examples/telegraf). Or mention @jackzampolin in a PR comment with some common queries that you would want to alert on and he will write one for you.
|
||||||
|
|
||||||
## GoDoc
|
## GoDoc
|
||||||
|
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -15,6 +15,10 @@ windows: prepare-windows build-windows
|
||||||
build:
|
build:
|
||||||
go install -ldflags "-X main.version=$(VERSION)" ./...
|
go install -ldflags "-X main.version=$(VERSION)" ./...
|
||||||
|
|
||||||
|
# Only run the build (no dependency grabbing)
|
||||||
|
experimental:
|
||||||
|
go install -tags experimental -ldflags "-X main.version=experimental-$(VERSION)" ./...
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
GOOS=windows GOARCH=amd64 go build -o telegraf.exe -ldflags \
|
GOOS=windows GOARCH=amd64 go build -o telegraf.exe -ldflags \
|
||||||
"-X main.version=$(VERSION)" \
|
"-X main.version=$(VERSION)" \
|
||||||
|
|
|
@ -13,10 +13,14 @@ import (
|
||||||
"github.com/influxdata/telegraf/agent"
|
"github.com/influxdata/telegraf/agent"
|
||||||
"github.com/influxdata/telegraf/internal/config"
|
"github.com/influxdata/telegraf/internal/config"
|
||||||
"github.com/influxdata/telegraf/plugins/inputs"
|
"github.com/influxdata/telegraf/plugins/inputs"
|
||||||
_ "github.com/influxdata/telegraf/plugins/inputs/all"
|
|
||||||
"github.com/influxdata/telegraf/plugins/outputs"
|
"github.com/influxdata/telegraf/plugins/outputs"
|
||||||
_ "github.com/influxdata/telegraf/plugins/outputs/all"
|
|
||||||
"github.com/kardianos/service"
|
"github.com/kardianos/service"
|
||||||
|
|
||||||
|
_ "github.com/influxdata/telegraf/plugins/experimental/inputs/all"
|
||||||
|
_ "github.com/influxdata/telegraf/plugins/experimental/outputs/all"
|
||||||
|
|
||||||
|
_ "github.com/influxdata/telegraf/plugins/inputs/all"
|
||||||
|
_ "github.com/influxdata/telegraf/plugins/outputs/all"
|
||||||
)
|
)
|
||||||
|
|
||||||
var fDebug = flag.Bool("debug", false,
|
var fDebug = flag.Bool("debug", false,
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
// +build experimental
|
||||||
|
|
||||||
|
package all
|
||||||
|
|
||||||
|
import ()
|
|
@ -0,0 +1,3 @@
|
||||||
|
// +build !experimental
|
||||||
|
|
||||||
|
package all
|
|
@ -0,0 +1,5 @@
|
||||||
|
// +build experimental
|
||||||
|
|
||||||
|
package all
|
||||||
|
|
||||||
|
import ()
|
|
@ -0,0 +1,3 @@
|
||||||
|
// +build !experimental
|
||||||
|
|
||||||
|
package all
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
The example plugin gathers metrics about example things
|
The example plugin gathers metrics about example things
|
||||||
|
|
||||||
|
You can read more information about this thing [here](https://google.com).
|
||||||
|
|
||||||
### Configuration:
|
### Configuration:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
|
|
|
@ -8,6 +8,30 @@ metrics is sent in each http request by setting batchSize in config.
|
||||||
|
|
||||||
See http://opentsdb.net/docs/build/html/api_http/put.html for details.
|
See http://opentsdb.net/docs/build/html/api_http/put.html for details.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
```toml
|
||||||
|
# Configuration for OpenTSDB server to send metrics to
|
||||||
|
[[outputs.opentsdb]]
|
||||||
|
## prefix for metrics keys
|
||||||
|
prefix = "my.specific.prefix."
|
||||||
|
|
||||||
|
## DNS name of the OpenTSDB server
|
||||||
|
## Using "opentsdb.example.com" or "tcp://opentsdb.example.com" will use the
|
||||||
|
## telnet API. "http://opentsdb.example.com" will use the Http API.
|
||||||
|
host = "opentsdb.example.com"
|
||||||
|
|
||||||
|
## Port of the OpenTSDB server
|
||||||
|
port = 4242
|
||||||
|
|
||||||
|
## Number of data points to send to OpenTSDB in Http requests.
|
||||||
|
## Not used with telnet API.
|
||||||
|
httpBatchSize = 50
|
||||||
|
|
||||||
|
## Debug true - Prints OpenTSDB communication
|
||||||
|
debug = false
|
||||||
|
```
|
||||||
|
|
||||||
## Transfer "Protocol" in the telnet mode
|
## Transfer "Protocol" in the telnet mode
|
||||||
|
|
||||||
The expected input from OpenTSDB is specified in the following way:
|
The expected input from OpenTSDB is specified in the following way:
|
||||||
|
|
Loading…
Reference in New Issue