influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.63k stars 5.58k forks source link

Add new command to list deprecation and plugins #11739

Closed sspaink closed 1 year ago

sspaink commented 2 years ago

Backwards compatibility is required

Related: https://github.com/influxdata/telegraf/issues/11316

Deprecate the flags --deprecation-list, --input-list, --output-list by adding DEPRECATED: to the Usage field for each. Then add a new command list and deprecated.

telegraf list-plugins ~ print all plugins telegraf list-deprecations ~ print all deprecated plugins and settings

telegraf list-plugins | grep inputs. telegraf list-deprecations | grep inputs.

powersj commented 2 years ago

The current behavior of --input-list for example prints:

 ./telegraf --input-list
Available Input Plugins:
  KNXListener
  activemq
  aerospike
  aliyuncms
  amd_rocm_smi
...

What would the new output look like, such that grep would allow someone to filter on inputs?

I was hoping we would do something like:

# lists all plugins included in this binary, deprecated or not
telegraf list 
# lists only inputs
telegraf list inputs 
# list deprecated plugins
telegraf list deprecated
# or deprecated could be a flag
telegraf list inputs --deprecated

I'm not sure I'm a fan of having two list-* subcommands that do things in the same domain of "listing plugins".

Hipska commented 2 years ago

What about

> telegraf plugins
inputs.example
inputs.internal
...

> telegraf plugins --deprecated
processors.deprecated_plugin