Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request feature to get options of fluent-plugin #584

Closed
toru-takahashi opened this issue Apr 22, 2015 · 5 comments
Closed

Request feature to get options of fluent-plugin #584

toru-takahashi opened this issue Apr 22, 2015 · 5 comments
Labels
feature request *Deprecated Label* Use enhancement label in general

Comments

@toru-takahashi
Copy link
Contributor

Descriptions

Each fluent-plugin has a lot of option.
Almost users need to choice these options for own use-case.
But, almost user don't know these options.
Therefore, it would be useful for users to show all options of fluent-plugin.

Expected Results

Ex.

> fluentd --show fluent-plugin-s3
    config_param :path, :string, :default => ""
    config_param :use_ssl, :bool, :default => true
    config_param :use_server_side_encryption, :string, :default => nil
    config_param :aws_key_id, :string, :default => nil
    config_param :aws_sec_key, :string, :default => nil
    config_param :s3_bucket, :string
    config_param :s3_region, :string, :default => nil
    config_param :s3_endpoint, :string, :default => nil
    config_param :s3_object_key_format, :string, :default => "%{path}%{time_slice}_%{index}.%{file_extension}"
    config_param :store_as, :string, :default => "gzip"
    config_param :auto_create_bucket, :bool, :default => true
    config_param :check_apikey_on_start, :bool, :default => true
    config_param :proxy_uri, :string, :default => nil
    config_param :reduced_redundancy, :bool, :default => false
    config_param :format, :string, :default => 'out_file'
@kazegusuri
Copy link
Contributor

I like this feature. I and my colleagues often spend time checking how to use plugins by reading upstream source code.
If possible (with self documented api and for supported plugins), it's better to show some examples together.

@tagomoris
Copy link
Member

I have some idea to realize this feature:

  1. load plugin
  2. build configure_proxy tree
  3. show it on console

Problems are:

  • config_param should accept description option to describe what it is
  • default can be overwritten in configure() method in non-declarative way
  • type may not be decided in declarative way with config_param w/ blocks

Related: #309

@repeatedly
Copy link
Member

Adding desc to config_param could be implemented in v0.12 but it needs extra cost...

@repeatedly repeatedly added the feature request *Deprecated Label* Use enhancement label in general label Jul 7, 2015
okkez added a commit to okkez/fluentd that referenced this issue Aug 25, 2015
@okkez
Copy link
Contributor

okkez commented Aug 26, 2015

I'm trying to implement this feature.

Work like following, for now.

$ bundle exec fluentd --show-plugin-config output:s3
2015-08-26 13:59:43 +0900 [info]: Show config for output:s3
2015-08-26 13:59:43 +0900 [info]: 
path: string: <"">
use_server_side_encryption: string: <nil>
aws_key_id: string: <nil>
aws_sec_key: string: <nil>
s3_bucket: string: <nil>
s3_region: string: <"us-east-1">
s3_endpoint: string: <nil>
s3_object_key_format: string: <"%{path}%{time_slice}_%{index}.%{file_extension}">
store_as: string: <"gzip">
auto_create_bucket: bool: <true>
check_apikey_on_start: bool: <true>
proxy_uri: string: <nil>
reduced_redundancy: bool: <false>
storage_class: string: <"STANDARD">
format: string: <"out_file">
acl: string: <:private>
assume_role_credentials
 role_arn: string: <nil>
 role_session_name: string: <nil>
 policy: string: <nil>
 duration_seconds: integer: <nil>
 external_id: string: <nil>
instance_profile_credentials
 retries: integer: <nil>
 ip_address: string: <nil>
 port: integer: <nil>
 http_open_timeout: float: <nil>
 http_read_timeout: float: <nil>
shared_credentials
 path: string: <nil>
 profile_name: string: <nil>

$ bundle exec fluentd --show-plugin-config input:dummy
2015-08-26 13:59:54 +0900 [info]: Show config for input:dummy
2015-08-26 13:59:54 +0900 [info]: 
tag: string: <nil>
rate: integer: <1>
auto_increment_key: string: <nil>
dummy: : <[{"message"=>"dummy"}]>

@repeatedly
Copy link
Member

closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request *Deprecated Label* Use enhancement label in general
Projects
None yet
Development

No branches or pull requests

5 participants