Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

How to disable the access log? #21

Open
mindw opened this issue Sep 22, 2019 · 14 comments
Open

How to disable the access log? #21

mindw opened this issue Sep 22, 2019 · 14 comments
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@mindw
Copy link

mindw commented Sep 22, 2019

Environment
Installation method: kubectl apply
Kubernetes version: 1.14
Dashboard version: 2.0.0-b4
Operating system: Linux
Steps to reproduce

Run the sidecar inside the dashboard pod::

        args:
          - --metric-resolution=30s
          - --log-level=warn
        ports:
        - containerPort: 8000
          name: http
        livenessProbe:
          httpGet:
            scheme: HTTP
            path: /
            port: http
          initialDelaySeconds: 30
          timeoutSeconds: 30

Get logs:
kubectl -n kube-system logs svc/kubernetes-dashboard -c dashboard-metrics-scraper

Observed result
10.0.7.85 - - [20/Sep/2019:23:47:15 +0000] "GET / HTTP/1.1" 200 6 "" "kube-probe/1.13"
10.0.7.85 - - [20/Sep/2019:23:47:25 +0000] "GET / HTTP/1.1" 200 6 "" "kube-probe/1.13"
127.0.0.1 - - [20/Sep/2019:23:47:31 +0000] "GET /healthz?timeout=32s HTTP/1.1" 200 25 "" "dashboard/v0.0.0 (linux/amd64) kubernetes/$Format"
Expected result

An empty log except for warning messages.

Comments
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 21, 2019
@mindw
Copy link
Author

mindw commented Dec 24, 2019

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 24, 2019
@danksim
Copy link

danksim commented Feb 12, 2020

I am experiencing the same thing with the kube-probe logs for liveness and readiness probes.

@MarcelTon
Copy link

We're seeing the same thing in our logs. The probe polling the root endpoint (and receiving a redirect) in rather rapid interval yielding quite a few loglines (thousands per hour).

10.12.28.58 - - [19/Mar/2020:13:34:02 +0000] "GET / HTTP/1.1" 302 138 "-" "kube-probe/1.14+"
10.12.28.58 - - [19/Mar/2020:13:34:03 +0000] "GET /expired HTTP/1.1" 200 43714 "http://10.12.7.211:80/" "kube-probe/1.14+"

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 18, 2020
@mindw
Copy link
Author

mindw commented Jun 18, 2020

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 18, 2020
@maciaszczykm
Copy link
Member

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Jun 18, 2020
@GrigorievNick
Copy link

Hi people,
Does anyone find a solution to disable this INFO log?
Maybe some flag or config on kubelet?

@sxwebdev
Copy link

Disable access_log in your nginx config

server {
   ...
   access_log off;
   ...
}

@nikhilagrawal577
Copy link

Is there any update on this ?

How others are tackling this ?

@mindw
Copy link
Author

mindw commented Apr 19, 2022

We dropped the dashboard from the cluster. It was too difficult to pass security review 🙁

@maciaszczykm maciaszczykm added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Apr 20, 2022
@tooptoop4
Copy link

anyone solve this?

@mikementzmaersk
Copy link

Disable access_log in your nginx config

server {
   ...
   access_log off;
   ...
}

Thanks !
Any ideas on where in the pods filesystem this is ? Then we could override it with a replacement from a configmap etc.. ;-)

@mindw
Copy link
Author

mindw commented Jun 5, 2023

Disable access_log in your nginx config

server {
   ...
   access_log off;
   ...
}

Thanks ! Any ideas on where in the pods filesystem this is ? Then we could override it with a replacement from a configmap etc.. ;-)

@mikementzmaersk @sxwebdev comment seems to be a red herring as it refers to the nginx access log.
If you're looking to filter out the logs then adding custom rules to your k8s log collector would be one way to do it (EA fluentd/fluent-bit/beat etc).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests