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

[logging] log messages show remoteAddress in userAgent #76473

Closed
koshatul opened this issue Sep 2, 2020 · 1 comment · Fixed by #76751
Closed

[logging] log messages show remoteAddress in userAgent #76473

koshatul opened this issue Sep 2, 2020 · 1 comment · Fixed by #76751
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@koshatul
Copy link

koshatul commented Sep 2, 2020

Kibana version: 7.9.0

Original install method (e.g. download page, yum, from source, etc.): apt

Describe the bug: Log messages are showing the remoteAddress in the userAgent field.

Steps to reproduce:

  1. Setup Kibana
  2. Access Kibana
  3. Check Logs

Expected behavior: probably replicate the request.userAgent into the userAgent field.

Provide logs and/or server output (if relevant):

Sep 02 14:18:34 kibana-test kibana[1121]: {"type":"response","@timestamp":"2020-09-02T04:18:34Z","tags":[],"pid":1121,"method":"get","statusCode":200,"req":{"url":"/ui/favicons/manifest.json","method":"get","headers":{"host":"kibana-test:8080","connection":"keep-alive","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36","accept":"*/*","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","sec-fetch-dest":"empty","referer":"https://kibana-test:8080/spaces/space_selector","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9"},"remoteAddress":"192.168.49.2","userAgent":"192.168.49.2","referer":"https://kibana-test:8080/spaces/space_selector"},"res":{"statusCode":200,"responseTime":4,"contentLength":9},"message":"GET /ui/favicons/manifest.json 200 4ms - 9.0B"}

Any additional context:
in src/legacy/server/logging/log_format.js#L94:

      data.req = {
        url: event.path,
        method: event.method || '',
        headers: event.headers,
        remoteAddress: source.remoteAddress,
        userAgent: source.remoteAddress,
        referer: source.referer,
      };
@streamich streamich added bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc triage_needed labels Sep 2, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants