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

Configuring logstash #84

Open
r-glyde opened this issue Aug 22, 2019 · 0 comments
Open

Configuring logstash #84

r-glyde opened this issue Aug 22, 2019 · 0 comments

Comments

@r-glyde
Copy link
Contributor

r-glyde commented Aug 22, 2019

Currently the logstash config looks for whether the KMS_LOGGING_LOGSTASH variable is defined to determine whether to enable logging or not.

<if condition='isDefined("KMS_LOGGING_LOGSTASH")'>

I think it is expected that a variable is passed in when the container is run that would set this value i.e. KMS_LOGGING_LOGSTASH: "true" to turn logging on. By only checking whether the variable is defined, something like KMS_LOGGING_LOGSTASH: "false" would also enable logging which is quite counterintuitive/wrong.

I think the condition should be adjusted to something where the configuration makes more sense e.g:

<if condition='p("KMS_LOGGING_LOGSTASH").equalsIgnoreCase("true")'>

I'm not sure if there are better ways of doing this e.g. parsing the env variable to a real boolean rather than true/false wrapped in a string.

Also, this config should probably be documented in the how-to-run-it section of the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant