LucidWorks support Forum » LucidWorks Enterprise

Activity Monitor

(17 posts) (5 voices)
  • Started 1 year ago by u23297
  • Latest reply from u23297

Tags:

No tags yet.

  1. u23297
    Member

    Hi again.

    I want to display the Activity Monitor out of the backend in my frontend Website (Queries per second) and the most popular queries.

    So can somebody tell me how to do this.

    Posted 1 year ago #
  2. tomas.lobbe
    Moderator

    Hi, all that information is available in the "LucidWorksLogs" collection. You can generate all those statistics and more by querying that collection.

    Posted 1 year ago #
  3. Lance
    Professional Services Engineer

    NewRelic (http://newrelic.com/) is an online service that monitors your Solr instance and gives graphs for queries-per-second. For "most popular queries", you need to query the LucidWorksLogs collection.

    Posted 1 year ago #
  4. u23297
    Member

    Hmm ok, but how can i querying that collection.

     

    Querying other collections is done like this:

    "http://server:port/solr/collection/lucid?q=test&wt=phps&role=DEFAULT&rows=100"

     

    To querying the collection LucidWorksLogs i need a word "q=....."

     

     

    About new relic:

    This app sounds good but do you know an application runs in intranet (offline).

    Posted 1 year ago #
  5. tomas.lobbe
    Moderator

    You can query the LucidWorksLogs collection as a regular collection, by adding the name to the URL:

    http://host:port/solr/LucidWorksLogs/select/?q=....

    For example, you could see the most common queries for the last week with a query like:

    http://host:port/solr/LucidWorksLogs/select/?q=*:*&fq=lastModified:[NOW/DAY-7DAY%20TO%20*]&fq=core:[yourcollection]&facet=true&facet.field=attr_q&rows=0

     

    I don't think newreilc can run offline, but you could use any monitoring tool. See http://www.lucidimagination.com/blog/2011/10/02/monitoring-apache-solr-and-lucidworks-with-zabbix/

    Posted 1 year ago #
  6. u23297
    Member

    Ok i have it. But there is a new problem. 

    When i start searching an object in the backend of LWE, it gets LucidWorksLogs get some information about most search words and so on. But if im searching in my frontend (api), no information (about most querying words for example) will send to this collection. 

     

    So i can querying the LucidWorksLogs Collection but the activities where not registred.

     

    About Monitoring:

    I see that we uses piwik as an analytics tool. Isnt it possible to handle the problem with piwik? Is someone useing it allready?

     

    Thanks.

    Posted 1 year ago #
  7. tomas.lobbe
    Moderator

    You are saying that if you search with your application then you don't see the requests in the LucidWorksLogs collection? you should. This collection collects lines from Solr's log, so it really doesn't matter where the queries come from, all should be indexed into this collection. 

    Posted 1 year ago #
  8. hossman1
    Moderator

    So i can querying the LucidWorksLogs Collection but the activities where not registred.

    There is a small note about this on the page with info on building clients that talk directly to Solr...

    http://lucidworks.lucidimagination.com/display/lweug/Solr+Direct+Access

    "To ensure that your query is indexed for UI reporting, include the <tt>req_type=main</tt> parameter in your query URL."

    In short: the LucidWorksLogs crawler only indexes requets containing <tt>req_type=main</tt> to ensure that things like autocomplete requests, or monitoring requests that you don't want tracked (ie: queries to the LucideWorksLogs collection itself), aren't recorded and don't throw off the statistics

    Posted 1 year ago #
  9. u23297
    Member

    Ohh yes it works. Thanks a lot!

    Posted 1 year ago #
  10. u23297
    Member

    OK one final question :D

    In backend the most popular queries were counted by lucid and shown in brackets as u now.

    So is it possible to get these information? So if im querying my LucidWorksLogs i get the following array:

     

    Array([response]=>......[facet_fields] => Array([attr_q] => Array([qms] => 0 [ISO] => 0 ...))) 

    As u can see there are only zeros.

    Posted 1 year ago #
  11. tomas.lobbe
    Moderator

    Could you show how you are executing the query?

    Posted 1 year ago #
  12. u23297
    Member

     

    <?php

    $url="http://qms:8888/solr/LucidWorksLogs/select/?q=*:*&wt=phps&fq=lastModified:[NOW%20TO%20*]&debugQuery=on&fq=core:alles_1&facet=on&facet.field=attr_q&rows=0";

      $serializedResult=file_get_contents($url);

    $response=unserialize($serializedResult);

    $a = $response['facet_counts']['facet_fields']['attr_q'];

    print_r($response); // check if result is given

    echo "<hr>"; //

    foreach ($a as $k => $v){

        echo "$k => $v
    ";

    }

    ?>

     

     

    Posted 1 year ago #
  13. Erik Hatcher
    Moderator

    lastModified:[NOW TO *] is likely not finding anything which explains the 0's.  Try what Tomas mentioned above: lastModified:[NOW/DAY-7DAY TO *] (and of course URL encode where appropriate).

    Posted 1 year ago #
  14. u23297
    Member

    I did, but nothing happens. The faced counts is zero.

    Can someone help me?

     

     

    Posted 1 year ago #
  15. Lance
    Professional Services Engineer

    Do a search in the LucidWorksLogs search ui. Are there any records during this time period? Or any records at all?

    Also, you have to say "&facet=true" in the query string. 

    Posted 1 year ago #
  16. u23297
    Member

    Hi again.   @Lance: Yes i have! In Backend of LWE there is a record, but not in my frontend! The searched query was posted but the faced counts is zero.    

    $url="http://".$search_server_name.":".$search_server_port."/solr/LucidWorksLogs/select/?q=*:*&wt=phps&fq=lastModified:[NOW/DAY-7DAY%20TO%20*]&debugQuery=on&fq=core:alles_1&facet=true&facet.field=attr_q&rows=0";  

    $serializedResult=file_get_contents($url);

     $response=unserialize($serializedResult);

    $a = $response['facet_counts']['facet_fields']['attr_q'];

    foreach ($a as $k => $v){

       echo utf8_decode($k)." (".$v.")";

    }  

     

    Output (after i had searched "QMS"):   QMS (0)

    Posted 1 year ago #
  17. u23297
    Member

    OK i've seen my fault!

     

    I had added a second "&fq=...." so my actual string is the following:

    $url="http://".$search_server_name.":".$search_server_port."/solr/LucidWorksLogs/select/?q=*:*&wt=phps&fq=lastModified:[NOW/DAY-7DAY%20TO%20*]&debugQuery=on&facet=true&facet.field=attr_q&rows=0";   

     

    Posted 1 year ago #

RSS feed for this topic