Closed alexellis closed 2 years ago
Custom HTTP probes create too much noise in logging
A custom HTTP probe to /healthz shouldn't fill the logs with repetitive messages
An OpenFaaS Pro customer reported getting spam in their logs every 1-2 seconds when the kubelet ran its healthcheck.
Only log when a user-agent does not have a prefix of "kube-probe"
go build && fprocess=cat mode=http upstream_url=http://192.168.0.15:8080 ./of-watchdog
curl -i localhost:8080/healthz --user-agent "kube-probe/1.21"
2022/02/20 10:42:18 GET /healthz - 200 OK - ContentLength: 0
Affecting a customer's logging aggregation tool and ability to debug/monitor functions effectively.
Custom HTTP probes create too much noise in logging
Expected Behaviour
A custom HTTP probe to /healthz shouldn't fill the logs with repetitive messages
Current Behaviour
An OpenFaaS Pro customer reported getting spam in their logs every 1-2 seconds when the kubelet ran its healthcheck.
Possible Solution
Only log when a user-agent does not have a prefix of "kube-probe"
Steps to Reproduce (for bugs)
go build && fprocess=cat mode=http upstream_url=http://192.168.0.15:8080 ./of-watchdog
curl -i localhost:8080/healthz --user-agent "kube-probe/1.21"
2022/02/20 10:42:18 GET /healthz - 200 OK - ContentLength: 0
Context
Affecting a customer's logging aggregation tool and ability to debug/monitor functions effectively.