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

Log Completed Request: LogLevel off not work #24157

Closed
rvojcik opened this issue Nov 16, 2023 · 4 comments
Closed

Log Completed Request: LogLevel off not work #24157

rvojcik opened this issue Nov 16, 2023 · 4 comments

Comments

@rvojcik
Copy link

rvojcik commented Nov 16, 2023

Describe the bug
Default log_requests_level should be off by the documentation. By default Vault log all completed requests to stdout.
I tried to explicitly turn it off via config.json file "log_requests_level": "off",

My configuration

    "log_level": "error",
    "log_requests_level": "off",

Vault still log every completed request even success ones as errors

Nov 16 10:06:55 vault3 vault[6098]: 2023-11-16T10:06:55.118+0100 [ERROR] core: completed_request: start_time="2023-11-16T10:06:55+01:00" duration=1ms client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx client_address=xxxxxxxxxxxxxxxxxxxx status_code=200 request_path=/v1/secrets/data/xxxxxxxxxxxxxxxxxxxx request_method=GET
Nov 16 10:06:55 vault3 vault[6098]: 2023-11-16T10:06:55.122+0100 [ERROR] core: completed_request: start_time="2023-11-16T10:06:55+01:00" duration=1ms client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx client_address=xxxxxxxxxxxxxxxxxx status_code=200 request_path=/v1/certs/data/xxxxxxxxxxxxxxxxxxxxxxx request_method=GET

To Reproduce
Steps to reproduce the behavior:

  1. Run vault server with disabled log_requests_level and log_level error
  2. Run read data from vault
  3. See stdout/stderr logs from vault server

Expected behavior
See only error (log_level: error) and no completed_request is logged (log_requests_level: off)

Environment:

  • Vault Server Version (retrieve with vault status): 1.15.2
  • Vault CLI Version (retrieve with vault version): 1.15.2
  • Server Operating System/Architecture: Debian 10 (Buster), AMD64,

Vault server configuration file(s):
config.json

{
     "api_addr": "https://xxxx:8200",
    "cluster_addr": "https://xxx:8201",
    "default_lease_ttl": "6h",
    "disable_mlock": true,
    "listener": {
        "tcp": {
            "address": "0.0.0.0:8200",
            "tls_cert_file": "xxxxx",
            "tls_key_file": "xxxxx"
        }
    },
    "log_level": "error",
    "log_requests_level": "off",
    "storage": {
        "raft": {
            "node_id": "vault3",
            "path": "/x/raft_storage"
        }
    },
    "telemetry": {
        "disable_hostname": true,
        "dogstatsd_addr": "localhost:8125",
        "prometheus_retention_time": "30s"
    },
    "ui": true

}
@delamart
Copy link

delamart commented Nov 20, 2023

Can confirm I can't disable request logs which in Kubernetes shows every probe call. Using vault:1.15.1-ubi

@adcsikos
Copy link

Same issue in my side as well! With vault verison:1.15.1-ubi. on openshift

@Dasio
Copy link

Dasio commented Nov 22, 2023

Probably fixed by #24056

@miagilepner
Copy link
Contributor

Probably fixed by #24056
This is correct. This change will be in the next minor release, so I'm going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants