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

Document how one can disable/enable ELK output #106

Open
Trolldemorted opened this issue Apr 25, 2021 · 15 comments
Open

Document how one can disable/enable ELK output #106

Trolldemorted opened this issue Apr 25, 2021 · 15 comments
Labels
documentation enhancement New feature or request

Comments

@Trolldemorted
Copy link
Member

for test setups w/o an elk

@ldruschk ldruschk added documentation enhancement New feature or request labels Apr 26, 2021
@ldruschk
Copy link
Member

I don't think there is a user-facing setting for this atm

@domenukk
Copy link
Member

domenukk commented Apr 26, 2021

For what it's worth, it looks like there used to be, see:

runparser.add_argument(

It could make sense to bring it back.

@ldruschk
Copy link
Member

But it would make more sense to have that as a global setting regardless of the runmode, right? When running the checker in listen mode locally for testing purposes, we would still like the human-readbale logs

@domenukk
Copy link
Member

Maybe an env var to enable elk logging in docker?

@ldruschk
Copy link
Member

we could also enable/disable it depending on the SERVER_SOFTWARE env variable: https://stackoverflow.com/a/25877937

@ldruschk
Copy link
Member

Or maybe that is still too specific, generally I would assume we want to disable ELK logging when running it via command line (regardless of the run mode) and enable it otherwise, which would be when run through gunicorn/uwsgi/whatever

@Trolldemorted
Copy link
Member Author

After giving this some more thought, should we switch this discussion to enospec and decide on a dedicated environment variable or something similar?

This way we can have CI disable elk output for all checkers.

@domenukk
Copy link
Member

Or maybe that is still too specific, generally I would assume we want to disable ELK logging when running it via command line (regardless of the run mode) and enable it otherwise, which would be when run through gunicorn/uwsgi/whatever

While developing, you may still use the HTTP version of the checker in a docker, but you still want to disable JSON output, right?

@ldruschk
Copy link
Member

Yes, but I would prefer default settings that could lead to people seeing JSON-formatted docs during development instead of having no logs in ELK in production due to a missing environment variable

@Savallator
Copy link
Contributor

Would you really want to specify another logging format then? Because the ELK output is well defined and could also be parsed by the CI. Introducing another spec for a different log format shared by all checkers would just make it more complicated, without any significant gain imho.

@Trolldemorted
Copy link
Member Author

Would you really want to specify another logging format then? Because the ELK output is well defined and could also be parsed by the CI. Introducing another spec for a different log format shared by all checkers would just make it more complicated, without any significant gain imho.

We don't have to specify the other format, specifying when and when not it does emit ELK-ready output should suffice.

@domenukk
Copy link
Member

domenukk commented Apr 26, 2021

If I understand @Trolldemorted correctly, he wants to specify how to change the logs to human-readable format, so that it's the same for all checkers.
How the human-readable logs themself look can then differ (as humans are rather good at parsing)
Worst case, the checker can still choose to always output the same jsons format, it would just be painful to use.

@Savallator
Copy link
Contributor

This way we can have CI disable elk output for all checkers.

I was referring this. If the CI disables ELK output, it can not automatically scan for errors...

@ldruschk
Copy link
Member

The CI should not need to parse log output at all, all relevant information should be in the HTTP responses. This is more about humans being able to manually read through the logs in case something fails during CI runs

@Savallator
Copy link
Contributor

I thought you wanted to parse the output to filter out the messages from the erroring run and show them in a condensed form to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants