parent
393d129982
commit
61269c3500
51
README.md
51
README.md
|
@ -85,46 +85,43 @@ if you don't have it already. You also must build with golang version 1.5+.
|
|||
|
||||
## How to use it:
|
||||
|
||||
```console
|
||||
$ telegraf --help
|
||||
Telegraf, The plugin-driven server agent for collecting and reporting metrics.
|
||||
See usage with:
|
||||
|
||||
Usage:
|
||||
```
|
||||
telegraf --help
|
||||
```
|
||||
|
||||
telegraf [commands|flags]
|
||||
### Generate a telegraf config file:
|
||||
|
||||
The commands & flags are:
|
||||
|
||||
config print out full sample configuration to stdout
|
||||
version print the version to stdout
|
||||
|
||||
--config <file> configuration file to load
|
||||
--test gather metrics once, print them to stdout, and exit
|
||||
--config-directory directory containing additional *.conf files
|
||||
--input-filter filter the input plugins to enable, separator is :
|
||||
--output-filter filter the output plugins to enable, separator is :
|
||||
--usage print usage for a plugin, ie, 'telegraf -usage mysql'
|
||||
--debug print metrics as they're generated to stdout
|
||||
--quiet run in quiet mode
|
||||
|
||||
Examples:
|
||||
|
||||
# generate a telegraf config file:
|
||||
```
|
||||
telegraf config > telegraf.conf
|
||||
```
|
||||
|
||||
# generate config with only cpu input & influxdb output plugins defined
|
||||
telegraf config -input-filter cpu -output-filter influxdb
|
||||
### Generate config with only cpu input & influxdb output plugins defined
|
||||
|
||||
# run a single telegraf collection, outputing metrics to stdout
|
||||
```
|
||||
telegraf --input-filter cpu --output-filter influxdb config
|
||||
```
|
||||
|
||||
### Run a single telegraf collection, outputing metrics to stdout
|
||||
|
||||
```
|
||||
telegraf --config telegraf.conf -test
|
||||
```
|
||||
|
||||
# run telegraf with all plugins defined in config file
|
||||
### Run telegraf with all plugins defined in config file
|
||||
|
||||
```
|
||||
telegraf --config telegraf.conf
|
||||
```
|
||||
|
||||
# run telegraf, enabling the cpu & memory input, and influxdb output plugins
|
||||
### Run telegraf, enabling the cpu & memory input, and influxdb output plugins
|
||||
|
||||
```
|
||||
telegraf --config telegraf.conf -input-filter cpu:mem -output-filter influxdb
|
||||
```
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
See the [configuration guide](docs/CONFIGURATION.md) for a rundown of the more advanced
|
||||
|
|
|
@ -95,7 +95,7 @@ Examples:
|
|||
telegraf config > telegraf.conf
|
||||
|
||||
# generate config with only cpu input & influxdb output plugins defined
|
||||
telegraf config -input-filter cpu -output-filter influxdb
|
||||
telegraf --input-filter cpu --output-filter influxdb config
|
||||
|
||||
# run a single telegraf collection, outputing metrics to stdout
|
||||
telegraf --config telegraf.conf -test
|
||||
|
|
|
@ -12,10 +12,10 @@ telegraf config > telegraf.conf
|
|||
```
|
||||
|
||||
To generate a file with specific inputs and outputs, you can use the
|
||||
-input-filter and -output-filter flags:
|
||||
--input-filter and --output-filter flags:
|
||||
|
||||
```
|
||||
telegraf config -input-filter cpu:mem:net:swap -output-filter influxdb:kafka
|
||||
telegraf --input-filter cpu:mem:net:swap --output-filter influxdb:kafka config
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
|
Loading…
Reference in New Issue