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

Configurable nginx access logs #168

Open
tuananhnguyen-ct opened this issue Feb 23, 2024 · 2 comments
Open

Configurable nginx access logs #168

tuananhnguyen-ct opened this issue Feb 23, 2024 · 2 comments

Comments

@tuananhnguyen-ct
Copy link

tuananhnguyen-ct commented Feb 23, 2024

What would be the best way to configure application access logs at nginx level? We want to log both the access when passing through the managed nginx and at the application to trace the performance and for debugging purposes.

For now we could edit the nginx configmap to add logging config, for example

log-format-upstream: '{"time": "$time_iso8601", "remote_addr": "$proxy_protocol_addr",
    "x_forwarded_for": "$proxy_add_x_forwarded_for", "request_id": "$req_id", "remote_user":
    "$remote_user", "bytes_sent": $bytes_sent, "request_time": $request_time, "status":
    $status, "vhost": "$host", "request_proto": "$server_protocol", "path": "$uri",
    "request_query": "$args", "request_length": $request_length, "duration": $request_time,"method":
    "$request_method", "http_referrer": "$http_referer", "http_user_agent": "$http_user_agent"
    }'

but it is not supported and will be reconciled/reset following #139

@tuananhnguyen-ct
Copy link
Author

To clarify, the default value of log-format-upstream doesn't work for our use case, as we want to collect the host name and use json format.

@tuananhnguyen-ct tuananhnguyen-ct changed the title Enable nginx access logs Configurable nginx access logs Feb 23, 2024
@OliverMKing
Copy link
Collaborator

We will add this to the backlog.

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

2 participants