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/12 17:23:19 UTC
Issue in Logging Client IP Addresses in Solr Cloud 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.
We tried to achieve this using the* requestLogger and requestDispatcher
elements* in solrconfig.xml, but we are not able to log Client IPs.
*Tried Approaches FYR:*
*Approach-1:*
<requestHandler name="test.handler" class="solr.SearchHandler">
<requestLogger name="requestLogger"
class="org.apache.solr.handler.RequestLoggingHandler" >
<lst name="invariants">
<str name="client_ip">true</str>
</lst>
</requestLogger>
</requestHandler>
*Approach-2:*
<requestDispatcher>
<lst name="requestParsers">
<lst name="application/x-www-form-urlencoded">
<str name="clientInfoHeader">x-forwarded-for</str>
</lst>
</lst>
</requestDispatcher>
Please suggest how to correctly configure Solr Cloud to include the Client
IP addresses in Solr logs.
*NOTE: *
*Solr Version used: *8.10
Also, please let me know if there are any performance considerations we
should be aware of when implementing this configuration.
Thanks & Regards
Uday Kumar
Re: Issue in Logging Client IP Addresses in Solr Cloud Logs
Posted by Uday Kumar <ud...@indiamart.com.INVALID>.
Hello Team,
Any update on the raised concern?
On Fri, May 12, 2023, 22:53 Uday Kumar <ud...@indiamart.com> wrote:
> 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.
>
> We tried to achieve this using the* requestLogger and requestDispatcher
> elements* in solrconfig.xml, but we are not able to log Client IPs.
>
> *Tried Approaches FYR:*
> *Approach-1:*
> <requestHandler name="test.handler" class="solr.SearchHandler">
> <requestLogger name="requestLogger"
> class="org.apache.solr.handler.RequestLoggingHandler" >
> <lst name="invariants">
> <str name="client_ip">true</str>
> </lst>
> </requestLogger>
> </requestHandler>
>
>
> *Approach-2:*
> <requestDispatcher>
> <lst name="requestParsers">
> <lst name="application/x-www-form-urlencoded">
> <str name="clientInfoHeader">x-forwarded-for</str>
> </lst>
> </lst>
> </requestDispatcher>
>
>
> Please suggest how to correctly configure Solr Cloud to include the Client
> IP addresses in Solr logs.
>
> *NOTE: *
> *Solr Version used: *8.10
>
> Also, please let me know if there are any performance considerations we
> should be aware of when implementing this configuration.
>
> Thanks & Regards
> Uday Kumar
>