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

Make access_log for main configurable #5625

Closed
hafe opened this issue May 27, 2024 · 9 comments · Fixed by #5648
Closed

Make access_log for main configurable #5625

hafe opened this issue May 27, 2024 · 9 comments · Fixed by #5648
Assignees
Labels
backlog Pull requests/issues that are backlog items proposal An issue that proposes a feature request refined Issues that are ready to be prioritized
Milestone

Comments

@hafe
Copy link
Contributor

hafe commented May 27, 2024

Is your feature request related to a problem? Please describe.
Currently it is not possible to globally configure log forward of access logs in a simple way. Logging high volume access logs to stdout means that they get forwarded to the log stack in Kubernetes. This can be problematic depending on the stack.

Describe the solution you'd like
Add a directive to the global Config map where the main access_log directive can be overridden

Describe alternatives you've considered
An alternative solution is to use a custom main template which is far from simple.

Additional context
Add any other context or screenshots about the feature request here.

@hafe hafe added the proposal An issue that proposes a feature request label May 27, 2024
Copy link

Hi @hafe thanks for reporting!

Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂

Cheers!

@hafe
Copy link
Contributor Author

hafe commented May 27, 2024

Just to mention, I have started working on a pull request.

@danielnginx
Copy link
Collaborator

Thank you @hafe we will review this issue in our community call.

@vepatel
Copy link
Contributor

vepatel commented May 30, 2024

related #4341

@jjngx jjngx added the ready for refinement An issue that was triaged and it is ready to be refined label Jun 4, 2024
@danielnginx danielnginx added refined Issues that are ready to be prioritized and removed ready for refinement An issue that was triaged and it is ready to be refined labels Jun 6, 2024
@danielnginx danielnginx added this to the v3.7.0 milestone Jun 6, 2024
@danielnginx
Copy link
Collaborator

Hi @hafe ,

We had a chance to discuss this issue and I want to add some context.

The future state is to integrate with OpenTelemetry and streaming logs using it. We are planning on it but we do not have a timeline for this work.

Until we get to a more robust solution we are happy to accept your contribution with some conditions:

1 - We need a flag to enable the access log
2 - The default access log is always off
3 - We must block any configuration that allows logging to files

Please let us know what you think about it?

@hafe
Copy link
Contributor Author

hafe commented Jun 10, 2024

Let's see:

  1. already exist
  2. is the inverse of today's default, I don't understand?
  3. I can see if I can add some validation to not allow file

@danielnginx
Copy link
Collaborator

Apologies, I should mention that I was looking in the PR.

Keep the flag as it is AccessLogOff.

Allow the access_log configuration but preventing logging to files.

@hafe
Copy link
Contributor Author

hafe commented Jun 12, 2024

Check latest version, only allows syslog

@danielnginx
Copy link
Collaborator

Tagging @jjngx

@danielnginx danielnginx added the backlog Pull requests/issues that are backlog items label Jun 17, 2024
hafe added a commit to hafe/kubernetes-ingress that referenced this issue Jul 14, 2024
hafe added a commit to hafe/kubernetes-ingress that referenced this issue Jul 29, 2024
@vepatel vepatel self-assigned this Jul 30, 2024
hafe added a commit to hafe/kubernetes-ingress that referenced this issue Aug 1, 2024
hafe added a commit to hafe/kubernetes-ingress that referenced this issue Aug 6, 2024
@jjngx jjngx self-assigned this Aug 8, 2024
hafe added a commit to hafe/kubernetes-ingress that referenced this issue Aug 8, 2024
hafe added a commit to hafe/kubernetes-ingress that referenced this issue Aug 9, 2024
Closes nginxinc#5625

Signed-off-by: Hans Feldt <2808287+hafe@users.noreply.github.com>
hafe added a commit to hafe/kubernetes-ingress that referenced this issue Aug 9, 2024
Closes nginxinc#5625

Signed-off-by: Hans Feldt <2808287+hafe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Pull requests/issues that are backlog items proposal An issue that proposes a feature request refined Issues that are ready to be prioritized
Projects
Status: Done 🚀
Development

Successfully merging a pull request may close this issue.

4 participants