Disable response logging (access log) in Kibana [7.16.3]

Hi, everyone

I have configured Kibana 7.16.3 logging in order not to be so verbose. Here you are an example:

logging:
  root:
    level: error

However, I would like to disable response information:

{"type":"response","@timestamp":"2022-02-22T12:03:55+00:00","tags":[],"pid":6,"method":"post","statusCode":200,"req":{"url":"/api/saved_objects/_bulk_resolve","method":"post","headers":{"host":"kibana:5601","connection":"close","content-length":"70","sec-ch-ua":"\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"98\", \"Microsoft Edge\";v=\"98\"","content-type":"application/json","sec-ch-ua-mobile":"?0","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 Edg/98.0.1108.56","kbn-version":"7.16.3","sec-ch-ua-platform":"\"Windows\"","accept":"*/*","origin":"https://<ip>:<port>","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","sec-fetch-dest":"empty","referer":"https://<ip>:<port>/app/dashboards","accept-encoding":"gzip, deflate, br","accept-language":"es,es-ES;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},"remoteAddress":"10.36.0.5","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 Edg/98.0.1108.56","referer":"https://<ip>:<port>/app/dashboards"},"res":{"statusCode":200,"responseTime":82,"contentLength":3742},"message":"POST /api/saved_objects/_bulk_resolve 200 82ms - 3.7KB"}

Is it possible?

Thanks in advance,

Regards

2 Likes

@jbudz can we please get some help?

Thanks!

1 Like

When you configure new logging system with

logging.root.level: error

the response log should not appear.
I suspect you have logging.verbose: true in your config as well. could you remove it? This option will be removed starting from v8.0.

If you need to keep it, you can disable logging for request/response in the legacy logging system with

logging:
  events:
    request: "!"
    response: "!"

Hi, @Mikhail_Shustov

Here you are my Kibana config:

server.port: 5601
server.host: "0.0.0.0"
server.publicBaseUrl: "http://kibana:5601"

elasticsearch.hosts: "https://elasticsearch:9200"

uiSettings.overrides.defaultRoute: "/app/dashboards#/view/Main-dashboard"

elasticsearch.username: ${KIBANA_USERNAME}
elasticsearch.password: ${KIBANA_PASSWORD}
elasticsearch.ssl.verificationMode: certificate
elasticsearch.ssl.certificateAuthorities: "/usr/share/kibana/certificates/root-ca.pem"

logging.root.level: error

xpack.security.encryptionKey: ${SECURITY_ENCRYPTION_KEY}
xpack.reporting.encryptionKey: ${REPORTING_ENCRYPTION_KEY}
xpack.encryptedSavedObjects.encryptionKey: ${SAVED_OBJECTS_ENCRYPTION_KEY}

monitoring.ui.enabled: true
monitoring.ui.logs.index: "elasticsearchlogs-*"
monitoring.ui.container.elasticsearch.enabled: true
monitoring.ui.container.logstash.enabled: true

xpack.security.secureCookies: true

xpack.security.audit.enabled: false

xpack.reporting.enabled: true
xpack.reporting.csv.enablePanelActionDownload: true
xpack.reporting.capture.browser.chromium.disableSandbox: false

By adding logging.quiet: true, response log does not appear, however, this parameter is deprecated.

Thanks in advance,

Regards

I don't see anything that might lead to these logs being written.

By adding logging.quiet: true , response log does not appear, however, this parameter is deprecated.

Let's use it as a temporary workaround. It would be interesting to check whether an upgrade to v8.0 resolves the problem.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.