elastic / logstash

Logstash - transport and process your logs, events, or other data
https://www.elastic.co/products/logstash
Other
69 stars 3.5k forks source link

Change behaviour of logstash-plugin command to show plugin version numbers by default. #5885

Closed geekpete closed 1 year ago

geekpete commented 8 years ago

Change behaviour of logstash-plugin command to show plugin version numbers by default. Provide an additional switch to list plugins in "bare" mode as was the previous default, might be useful for anyone scripting with this list.

Many users might not immediately know that to reveal version numbers requires the -verbose option.

So this by default:

logstash-codec-collectd (3.0.2)
logstash-codec-dots (3.0.2)
logstash-codec-edn (3.0.2)
logstash-codec-edn_lines (3.0.2)
logstash-codec-es_bulk (3.0.2)
logstash-codec-fluent (3.0.2)
logstash-codec-graphite (3.0.2)
logstash-codec-json (3.0.2)
logstash-codec-json_lines (3.0.2)
logstash-codec-line (3.0.2)
logstash-codec-msgpack (3.0.2)
logstash-codec-multiline (3.0.2)
logstash-codec-netflow (3.1.2)
logstash-codec-plain (3.0.2)
logstash-codec-rubydebug (3.0.2)
logstash-filter-clone (3.0.2)
logstash-filter-csv (3.0.2)
logstash-filter-date (3.0.3)
logstash-filter-dns (3.0.3)
logstash-filter-drop (3.0.2)
logstash-filter-fingerprint (3.0.2)
logstash-filter-geoip (4.0.3)
logstash-filter-grok (3.2.1)
logstash-filter-json (3.0.2)
logstash-filter-kv (3.1.1)
logstash-filter-metrics (4.0.2)
logstash-filter-mutate (3.1.1)
logstash-filter-ruby (3.0.2)
logstash-filter-sleep (3.0.2)
logstash-filter-split (3.1.1)
logstash-filter-syslog_pri (3.0.2)
logstash-filter-throttle (4.0.0)
logstash-filter-urldecode (3.0.2)
logstash-filter-useragent (3.0.2)
logstash-filter-uuid (3.0.2)
logstash-filter-xml (4.0.1)
logstash-input-beats (3.1.0.beta4)
logstash-input-couchdb_changes (3.0.2)
logstash-input-elasticsearch (3.0.2)
logstash-input-exec (3.1.1)
logstash-input-file (3.0.3)
logstash-input-ganglia (3.0.2)
logstash-input-gelf (3.0.2)
logstash-input-generator (3.0.2)
logstash-input-graphite (3.0.2)
logstash-input-heartbeat (3.0.2)
logstash-input-http (3.0.3)
logstash-input-http_poller (3.0.3)
logstash-input-imap (3.0.2)
logstash-input-irc (3.0.2)
logstash-input-jdbc (4.1.1)
logstash-input-kafka (5.0.1)
logstash-input-log4j (3.0.2)
logstash-input-lumberjack (3.1.1)
logstash-input-pipe (3.0.2)
logstash-input-rabbitmq (5.1.1)
logstash-input-redis (3.1.1)
logstash-input-s3 (3.1.1)
logstash-input-snmptrap (3.0.2)
logstash-input-sqs (3.0.2)
logstash-input-stdin (3.1.1)
logstash-input-syslog (3.0.2)
logstash-input-tcp (4.0.3)
logstash-input-twitter (3.0.2)
logstash-input-udp (3.0.2)
logstash-input-unix (3.0.2)
logstash-input-xmpp (3.1.1)
logstash-output-cloudwatch (3.0.2)
logstash-output-csv (3.0.2)
logstash-output-elasticsearch (4.1.3)
logstash-output-file (3.0.2)
logstash-output-graphite (3.1.1)
logstash-output-http (3.1.1)
logstash-output-irc (3.0.2)
logstash-output-kafka (5.0.1)
logstash-output-nagios (3.0.2)
logstash-output-null (3.0.2)
logstash-output-pagerduty (3.0.2)
logstash-output-pipe (3.0.2)
logstash-output-rabbitmq (4.0.4)
logstash-output-redis (3.0.2)
logstash-output-s3 (3.1.2)
logstash-output-sns (4.0.2)
logstash-output-sqs (3.0.2)
logstash-output-statsd (3.1.1)
logstash-output-stdout (3.0.2)
logstash-output-tcp (3.2.0)
logstash-output-udp (3.0.2)
logstash-output-webhdfs (3.0.2)
logstash-output-xmpp (3.0.2)
logstash-patterns-core (4.0.2)

rather than this:

logstash-codec-collectd
logstash-codec-dots
logstash-codec-edn
logstash-codec-edn_lines
logstash-codec-es_bulk
logstash-codec-fluent
logstash-codec-graphite
logstash-codec-json
logstash-codec-json_lines
logstash-codec-line
logstash-codec-msgpack
logstash-codec-multiline
logstash-codec-netflow
logstash-codec-plain
logstash-codec-rubydebug
logstash-filter-clone
logstash-filter-csv
logstash-filter-date
logstash-filter-dns
logstash-filter-drop
logstash-filter-fingerprint
logstash-filter-geoip
logstash-filter-grok
logstash-filter-json
logstash-filter-kv
logstash-filter-metrics
logstash-filter-mutate
logstash-filter-ruby
logstash-filter-sleep
logstash-filter-split
logstash-filter-syslog_pri
logstash-filter-throttle
logstash-filter-urldecode
logstash-filter-useragent
logstash-filter-uuid
logstash-filter-xml
logstash-input-beats
logstash-input-couchdb_changes
logstash-input-elasticsearch
logstash-input-exec
logstash-input-file
logstash-input-ganglia
logstash-input-gelf
logstash-input-generator
logstash-input-graphite
logstash-input-heartbeat
logstash-input-http
logstash-input-http_poller
logstash-input-imap
logstash-input-irc
logstash-input-jdbc
logstash-input-kafka
logstash-input-log4j
logstash-input-lumberjack
logstash-input-pipe
logstash-input-rabbitmq
logstash-input-redis
logstash-input-s3
logstash-input-snmptrap
logstash-input-sqs
logstash-input-stdin
logstash-input-syslog
logstash-input-tcp
logstash-input-twitter
logstash-input-udp
logstash-input-unix
logstash-input-xmpp
logstash-output-cloudwatch
logstash-output-csv
logstash-output-elasticsearch
logstash-output-file
logstash-output-graphite
logstash-output-http
logstash-output-irc
logstash-output-kafka
logstash-output-nagios
logstash-output-null
logstash-output-pagerduty
logstash-output-pipe
logstash-output-rabbitmq
logstash-output-redis
logstash-output-s3
logstash-output-sns
logstash-output-sqs
logstash-output-statsd
logstash-output-stdout
logstash-output-tcp
logstash-output-udp
logstash-output-webhdfs
logstash-output-xmpp
logstash-patterns-core
ph commented 8 years ago

I then to agree with this proposal, most of the time when we use the list subcommand we want to get the version of the plugins.

But adding the version by default might break some automating tools that rely on that command. We had a chat on slack @jordansissel and I about this, he suggested that when we call logstash-plugin list beats we return by default the version in that usecase.

Not all users are aware that the list accepts a pattern to search.

geekpete commented 8 years ago

Sounds like a nice compromise. We could also add a logstash-plugin list-versions or similar as a new command that appears in the default help page.

geekpete commented 3 years ago

Is this issue still relevant? It seems --verbose might be sufficient even without listing specific version if listing a single plugin.

Another idea (especially for automation) might be providing some kind of --output-format parameter to then allow different output styles like csv, json, json_flat,etc and maybe have verbose option in there too.

./bin/logstash-plugin list --output-format="json_flat,verbose"