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

allow outputting resulting config file when merging multiple ones #3243

Closed
nellicus opened this issue May 14, 2015 · 13 comments

Comments

@nellicus
Copy link
Member

commented May 14, 2015

./bin/logstash --show-config -f /my_config_files_dir 
//don't start just show resulting config
input{
//all merged inputs
}
filter{
//all merged filters
}
output{
//all merged outputs
}
@jsvd

This comment has been minimized.

Copy link
Member

commented May 14, 2015

We already have the -t flag to check the validity of the config file, I think it would be interesting to implement your suggestion as a verbose flag for -t, such as:

% bin/logstash -v -t -f config
input {
  stdin { codec => json }
}
output {
  elasticsearch { }
}

 {:level=>:info}
Using version 0.1.x input plugin 'stdin'. This plugin isn't well supported by the community and likely has no maintainer. {:level=>:info}
Using version 0.1.x codec plugin 'json'. This plugin isn't well supported by the community and likely has no maintainer. {:level=>:info}
Using version 0.1.x output plugin 'elasticsearch'. This plugin isn't well supported by the community and likely has no maintainer. {:level=>:info}
Using version 0.1.x codec plugin 'plain'. This plugin isn't well supported by the community and likely has no maintainer. {:level=>:info}
Configuration OK
% bin/logstash -t -f config
Configuration OK
@nellicus

This comment has been minimized.

Copy link
Member Author

commented May 14, 2015

ideally show which config file is contributing to each part of the merged config

@nellicus nellicus added the discuss label Oct 7, 2015

@gmoskovicz

This comment has been minimized.

Copy link
Contributor

commented Oct 7, 2015

+1 on this!

@jordansissel

This comment has been minimized.

Copy link
Contributor

commented Oct 7, 2015

I think this should be pretty simple to do. I'll see about making it happen in the next release.

Can you confirm what kind of output you want? Something like a comment-annotated form of what files are providing what sections of the config file?

@colinsurprenant

This comment has been minimized.

Copy link
Contributor

commented Oct 7, 2015

+1 on a -v verbose option in conjunction of -t
+1 on comment annotated file reference for section

@jordansissel

This comment has been minimized.

Copy link
Contributor

commented Oct 7, 2015

ooooh I like that, adding --verbose to --config-test would make it output an annotated, concatenated config file?

@jordansissel

This comment has been minimized.

Copy link
Contributor

commented Oct 7, 2015

@nellicus @gmoskovicz Can you comment and let us know if the proposed interface (--config-test --verbose) works for you as a way to view the full config (w/ annotation)?

@robin13

This comment has been minimized.

Copy link
Member

commented Oct 8, 2015

+1

@gmoskovicz

This comment has been minimized.

Copy link
Contributor

commented Oct 8, 2015

@jordansissel works for me, but also, perhaps i was thinking something more like --print-config, but that could only be an alias for the --config-test --verbose right?

@nellicus

This comment has been minimized.

Copy link
Member Author

commented Oct 8, 2015

@jordansissel I'm with @colinsurprenant

+1 on a -v verbose option in conjunction of -t
+1 on comment annotated file reference for section

@suyograo suyograo added the v2.1.0 label Oct 13, 2015

@suyograo suyograo assigned purbon and untergeek and unassigned purbon Oct 15, 2015

@acchen97 acchen97 referenced this issue Nov 4, 2015
5 of 6 tasks complete
untergeek added a commit to untergeek/logstash that referenced this issue Nov 12, 2015
Add config file output to --configtest
This only works when the `--debug` flag is also enabled.

fixes elastic#3243
untergeek added a commit to untergeek/logstash that referenced this issue Nov 12, 2015
Add config file output to --configtest
This only works when the `--debug` flag is also enabled.

fixes elastic#3243

Changes to log formatting per request

Change :file to :config_file

:file gets overridden by `logstash/agent.rb`, so a different symbol
is necessary.  Changing to `:config_file`

@untergeek untergeek closed this in d514ba5 Nov 12, 2015

untergeek added a commit that referenced this issue Nov 12, 2015
Add config file output to --configtest
This only works when the `--debug` flag is also enabled.

fixes #3243

Changes to log formatting per request

Change :file to :config_file

:file gets overridden by `logstash/agent.rb`, so a different symbol
is necessary.  Changing to `:config_file`

Fixes #4182
@untergeek

This comment has been minimized.

Copy link
Member

commented Nov 12, 2015

This is resolved. In 2.1, combining --debug with --configtest will result in output like this: https://gist.github.com/untergeek/e31bedbe5b34f21d1cba

@gmoskovicz

This comment has been minimized.

Copy link
Contributor

commented Nov 12, 2015

This looks great!!

@jakommo

This comment has been minimized.

Copy link

commented Nov 13, 2015

nice 👍

suyograo added a commit to suyograo/logstash that referenced this issue Nov 16, 2015
Add CLI documentation for elastic#3243
We added new --debug option in elastic#3243, adding it to CLI flags
suyograo added a commit that referenced this issue Nov 16, 2015
Add CLI documentation for #3243
We added new --debug option in #3243, adding it to CLI flags

Fixes #4199
suyograo added a commit that referenced this issue Nov 16, 2015
Add CLI documentation for #3243
We added new --debug option in #3243, adding it to CLI flags

Fixes #4199
suyograo added a commit that referenced this issue Nov 16, 2015
Add CLI documentation for #3243
We added new --debug option in #3243, adding it to CLI flags

Fixes #4199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.