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

Include client IP/host in slowlog entries #9669

Closed
ppf2 opened this issue Feb 12, 2015 · 23 comments
Closed

Include client IP/host in slowlog entries #9669

ppf2 opened this issue Feb 12, 2015 · 23 comments
Labels
:Core/Infra/Logging Log management and logging utilities >enhancement help wanted adoptme

Comments

@ppf2
Copy link
Member

ppf2 commented Feb 12, 2015

Sometimes it may be helpful to be able to log the the host/IP of the end client that submitted a search or indexing request (eg. somebody has been sending these really bad queries to the cluster and we want to find out the host/IP of the offending search client application/host). Would be nice to have this as part of the slowlog entries.

@s1monw
Copy link
Contributor

s1monw commented Feb 13, 2015

I agree this can be useful. It can also be useful in the context of shield to log user information who issues the request. We can forward the headers from the request to the SearchContenxt and then log it? I mean we can even go further and allow users to specify a mustache template to make up their log line here?

@cfeio
Copy link

cfeio commented Mar 18, 2015

+1 This would be very useful in troubleshooting where slow queries are coming from

@clintongormley clintongormley added the :Core/Infra/Logging Log management and logging utilities label Jun 7, 2015
@martijnvg
Copy link
Member

+1 there is no doubt about the usefulness of this enhancement

@justinvaldez
Copy link

Please add this - It's way to hard to locate the offending bad queries at this point in time.

@sherry-ger
Copy link

+1

@jasontedor jasontedor removed the good first issue low hanging fruit label Feb 24, 2016
@seang-es
Copy link

+1

@charlesfeng
Copy link

+1

@nezhazheng
Copy link

+1

@clintongormley
Copy link

Discussed in FixItFriday - we should allow the requestor to specify a custom header (eg X-Opaque-ID) which is then logged in the search and index slow logs.

@nmeisels
Copy link

+1 This would be extremely useful

@higee
Copy link

higee commented Feb 4, 2018

+1

@kovyrin
Copy link

kovyrin commented Apr 5, 2018

+1 for adding user IP and the opaque id to slow logs (and, maybe, the user name as well)

@IngaFeick
Copy link

+1 Really really need this, but for all logs, not just slow logs.

@lwjli
Copy link

lwjli commented Apr 19, 2018

The x-pack plugin provides similar functionality, see https://www.elastic.co/guide/en/x-pack/current/auditing.html
But it just log the client ip for some events, not slowlog.

@mylinuxsa
Copy link

+1
I need

@kevinconaway
Copy link

It looks like the X-Opaque-Id is now available in the slowlog via #31539

@pgomulka
Copy link
Contributor

closing as this is being supported by x-opaque-id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Logging Log management and logging utilities >enhancement help wanted adoptme
Projects
None yet
Development

No branches or pull requests