I have a simple livenessProbe http check:
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 20
timeoutSeconds: 30
failureThreshold: 3
successThreshold: 3
In my logs there are tons of /health checks with status 200 OK and it makes logs really big and therefore expensive. Is there a way to log only when status is NOT 200?
I was trying to search for answer but no luck yet.
Can anybody help me with it? Thanks
#UPDATE
i think the logs are generating through nginx:
nginx's configuration:
server {
listen 8080;
root /www/data/;
index index.html;
access_log off;
location /health {
return 200 '{\"status\": \"ok\"}';
default_type application/json;
}
location / {
gzip on;
try_files $uri /index.html;
}
}