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

[Metrics scraper] How to disable the access log? #8013

Closed
maciaszczykm opened this issue Jul 7, 2023 · 3 comments
Closed

[Metrics scraper] How to disable the access log? #8013

maciaszczykm opened this issue Jul 7, 2023 · 3 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@maciaszczykm
Copy link
Member

maciaszczykm commented Jul 7, 2023

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
Looks like the sidecar uses gorilla combined logging handler. Couldn't find a way to disable it.
That format is inconsistent with the rest of the k8s components which use klog. Makes writing a parser harder than it should be.
kubernetes/kubernetes#61006
https://github.com/kubernetes/klog

Opened by @mindw.

See kubernetes-sigs/dashboard-metrics-scraper#21 for more details.

@maciaszczykm maciaszczykm added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 7, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/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 Jan 24, 2024
@mindw
Copy link

mindw commented Jan 25, 2024

/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 Jan 25, 2024
@maciaszczykm
Copy link
Member Author

Metrics scraper is using klog now. You can also easily configure logging levels now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants