Hi Stefan,
I am not aware of option to log only client side queries, but I think that you 
can find workaround with what you currently have. If you take a look at log 
lines for query that comes from the client and one that is result of querying 
shards, you will see differences - the most simple one, if you are not using 
solrj for querying, would be wt parameter: e.g. client request might have 
wt=json while shard requests would have wt=javabin.
There are also parameters that are added by Solr for internal calls so just 
compare log lines you will find some discriminator in your version of Solr.

HTH,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 5 Dec 2017, at 07:58, Matzdorf, Stefan, Springer SBM DE 
> <stefan.matzd...@springer.com> wrote:
> 
> Hey everybody,
> 
> i have a question regarding query-request logging in solr-cloud. I've set the 
> the "org.apache.solr.core.SolrCore.Request"-logger to INFO-level and its 
> logging all those query-requests. So far so good. BUT, as I'm running Solr in 
> cloud mode with 3 nodes and 3 shards per collections (with a replica of 3; 
> distributed about all 3 nodes), i get a logging statement from each node as 
> well as from each shard. That i get it from each node seems quite obvious to 
> me. Different server, different solr-instances...ok. But how could i avoid 
> getting also the logs from the shards itself?
> 
> My main problem is, that i would like to measure, classify etc my queries. 
> But for example if i would like to count the number of queries it goes a bit 
> weird. So from one request sent to the cloud i got 5-7 logging statements. (i 
> guess it depends on the results of found documents within a shard?!).
> 
> 
> If i could get just one log-statement per node per request (in my case 3) 
> would be good. But even then, i have to do some math to get the exact values. 
> At the first look it seems quite easy, dividing by 3, but thats sadly not the 
> case. So what happens if one node goes down? Then i would just get 2 
> log-statements. Thats also the reason why i can't set the log-level to INFO 
> just on one node.
> 
> 
> 
> Long story short, is there a better way to log queries, then setting 
> "org.apache.solr.core.SolrCore.Request" to INFO???
> 
> 
> Thanks in advance?

Reply via email to