You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Uday Kumar <ud...@indiamart.com.INVALID> on 2023/05/17 06:51:13 UTC
Logging Client IP Addresses in Solr Logs
Hello all,
Currently, we are logging various details for tracking when a user request
hits Solr Cloud. These details include the timestamp, class name, core
name, web app, path, hits, status, and Qtime.
However, we now require the
*Client IP to be included in the logs.*
Please let me know how we can log Client IP addresses in Solr Logs.
*NOTE: *
Solr Version used: 8.10
Thanks & Regards
Uday Kumar
Re: Logging Client IP Addresses in Solr Logs
Posted by Shawn Heisey <ap...@elyograg.org>.
On 5/17/23 00:51, Uday Kumar wrote:
> Currently, we are logging various details for tracking when a user request
> hits Solr Cloud. These details include the timestamp, class name, core
> name, web app, path, hits, status, and Qtime.
>
> However, we now require the
> *Client IP to be included in the logs.*
> Please let me know how we can log Client IP addresses in Solr Logs.
Solr itself does not log the IP address, but the Jetty process that runs
Solr can create a request log which does have the source address.
In 8.5 through 8.11, you can add an environment variable that enables
the request logging to the include script. That is solr.in.sh which may
be in /etc/default, or solr.in.cmd for Windows.
SOLR_REQUESTLOG_ENABLED=true
Starting in 9.0, the request log is enabled by default and it can be
disabled with the same SOLR_REQUESTLOG_ENABLED variable that worked on
earlier versions to enable it.
For completeness: In versions prior to 8.5, enabling the request log
involved editing an xml config file for jetty.
Thanks,
Shawn