Oauth2-proxy: Feature request - Option to silence all requests to /ping endpoint

Created on 29 May 2019  路  3Comments  路  Source: oauth2-proxy/oauth2-proxy

I use multiple instances of the oauth_proxy to handle ingress to my Kubernetes cluster.
But the readiness and liveness probes creates a lot of log entries.

Expected Behavior

Setting -logging-silent-ping disables all logging of requests to the ping endpoints.

Eg:

[29/May/2019:06:46:22 +0000] 10.0.0.10:4180 GET - "/ping" HTTP/1.1 "kube-probe/1.12" 200 2 0.000 

Current Behavior

Currently we get one log line pr oauth2_proxy pr 5 seconds.

Possible Solution

Add a command line parameter + environment variable to silence requests to the ping endpoint.

Context

I have 10 instances of the oauth2_proxy running in each cluster, with 5 seconds health probe.
This gives 10 instances * 12 logs pr minute * 60 minuts * 24 hours = 172,800 logs pr day.

Removing these would remove a lot of clutter from my log tools.

Your Environment

  • Version used: latest
enhancement good first issue help wanted

All 3 comments

I'm happy for a flag to be added with the behaviour you have described, does anyone have any time to work on it? Should be fairly simple to do I would have thought.

This is where the request logs are generated:
https://github.com/pusher/oauth2_proxy/blob/f26ed5f3d1cd810984f430cc4b0436e7b3b7477a/logging_handler.go#L106
I guess you could add an if statement to this that skips logging for the /ping endpoint if the option is enabled?

We're experiencing this too and have started on a PR. Cheers.

It seems this should be closed.

Was this page helpful?
0 / 5 - 0 ratings