2018-04-11 23:44:55 +00:00
|
|
|
// +build !windows
|
|
|
|
|
2018-05-04 21:16:21 +00:00
|
|
|
package internal
|
2018-04-11 23:44:55 +00:00
|
|
|
|
2018-05-04 21:16:21 +00:00
|
|
|
const Usage = `Telegraf, The plugin-driven server agent for collecting and reporting metrics.
|
2018-04-11 23:44:55 +00:00
|
|
|
|
|
|
|
Usage:
|
|
|
|
|
|
|
|
telegraf [commands|flags]
|
|
|
|
|
|
|
|
The commands & flags are:
|
|
|
|
|
|
|
|
config print out full sample configuration to stdout
|
|
|
|
version print the version to stdout
|
|
|
|
|
2018-09-10 18:53:04 +00:00
|
|
|
--aggregator-filter <filter> filter the aggregators to enable, separator is :
|
|
|
|
--config <file> configuration file to load
|
|
|
|
--config-directory <directory> directory containing additional *.conf files
|
2019-07-30 04:34:03 +00:00
|
|
|
--plugin-directory directory containing *.so files, this directory will be
|
|
|
|
searched recursively. Any Plugin found will be loaded
|
|
|
|
and namespaced.
|
2018-09-10 18:53:04 +00:00
|
|
|
--debug turn on debug logging
|
|
|
|
--input-filter <filter> filter the inputs to enable, separator is :
|
|
|
|
--input-list print available input plugins.
|
|
|
|
--output-filter <filter> filter the outputs to enable, separator is :
|
|
|
|
--output-list print available output plugins.
|
|
|
|
--pidfile <file> file to write our pid to
|
|
|
|
--pprof-addr <address> pprof address to listen on, don't activate pprof if empty
|
|
|
|
--processor-filter <filter> filter the processors to enable, separator is :
|
|
|
|
--quiet run in quiet mode
|
2019-04-26 03:39:29 +00:00
|
|
|
--section-filter filter config sections to output, separator is :
|
|
|
|
Valid values are 'agent', 'global_tags', 'outputs',
|
|
|
|
'processors', 'aggregators' and 'inputs'
|
2018-09-10 18:53:04 +00:00
|
|
|
--sample-config print out full sample configuration
|
2020-04-20 17:49:10 +00:00
|
|
|
--test enable test mode: gather metrics, print them out,
|
|
|
|
and exit. Note: Test mode only runs inputs, not
|
|
|
|
processors, aggregators, or outputs
|
2019-06-14 19:06:25 +00:00
|
|
|
--test-wait wait up to this many seconds for service
|
|
|
|
inputs to complete in test mode
|
2018-09-10 18:53:04 +00:00
|
|
|
--usage <plugin> print usage for a plugin, ie, 'telegraf --usage mysql'
|
|
|
|
--version display the version and exit
|
2018-04-11 23:44:55 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
# generate a telegraf config file:
|
|
|
|
telegraf config > telegraf.conf
|
|
|
|
|
|
|
|
# generate config with only cpu input & influxdb output plugins defined
|
|
|
|
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
|
|
|
|
telegraf --config telegraf.conf
|
|
|
|
|
|
|
|
# run telegraf, enabling the cpu & memory input, and influxdb output plugins
|
|
|
|
telegraf --config telegraf.conf --input-filter cpu:mem --output-filter influxdb
|
|
|
|
|
|
|
|
# run telegraf with pprof
|
|
|
|
telegraf --config telegraf.conf --pprof-addr localhost:6060
|
|
|
|
`
|