Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

log elasticsearch requests

Tags:

How to log requests which came to elasticsearch?

I set in elasticsearch/bin/service/elasticsearch.conf:

wrapper.logfile=/var/log/elasticsearch/debug.log

# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel=DEBUG

But the log file shows only:

STATUS | wrapper  | 2012/12/11 13:00:00 | TERM trapped.  Shutting down.
STATUS | wrapper  | 2012/12/11 13:00:02 | <-- Wrapper Stopped
STATUS | wrapper  | 2012/12/11 13:00:05 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2012/12/11 13:00:05 | Java Service Wrapper Community Edition 64-bit 3.5.6
STATUS | wrapper  | 2012/12/11 13:00:05 |   Copyright (C) 1999-2010 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2012/12/11 13:00:05 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2012/12/11 13:00:05 | 
WARN   | wrapper  | 2012/12/11 13:00:05 | The value of wrapper.java.command does not appear to be a java binary.
WARN   | wrapper  | 2012/12/11 13:00:05 | The use of scripts is not supported. Trying to continue, but some features may not work correctly..
STATUS | wrapper  | 2012/12/11 13:00:05 | Launching a JVM...
INFO   | jvm 1    | 2012/12/11 13:00:05 | WrapperManager: Initializing...

No info about my requests...

I use elasticsearch 0.17.6

like image 977
czerasz Avatar asked Dec 11 '12 13:12

czerasz


People also ask

How do I get Elasticsearch logs?

On Docker, log messages go to the console and are handled by the configured Docker logging driver. To access logs, run docker logs . For Debian installations, Elasticsearch writes logs to /var/log/elasticsearch . For RPM installations, Elasticsearch writes logs to /var/log/elasticsearch .

Is Elasticsearch good for logging?

Elasticsearch, which stores and searches documents, along with its ability to scale over huge volume of data, is a good candidate for inclusion in an application log analytics solution.

Can you send logs directly to Elasticsearch?

Logs can be sent to Elasticsearch in different ways, including directly from the application and by using a data shipper such as Filebeat.


1 Answers

There are no request logging facilities available in elasticsearch 0.17.6. The version 0.18.3 and above supports logging of slow search operations, which can be configured with threshold of 0ms to log all search requests for all shards. In the version 0.19.12 this functionality was expanded to index queries as well.

If you are interested in logging all HTTP requests, the elasticsearch-jetty plugin supports this functionality for elasticsearch 0.18.4 and above.

like image 189
imotov Avatar answered Oct 16 '22 02:10

imotov