Details
-
Improvement
-
Resolution: Duplicate
-
Major
-
3.0
-
Security Level: Public
-
None
Description
Currently, view queries are logged in couchdb.log as GET requests against view URLs. For a high volume of queries, this can result in a lot of logging, and also does not lend itself well to reporting. Also, since this log is rolled out based on file size, it is typical on a system serving many queries to only have information dating back a few hours, or maybe a day.
In a directory containing extracted cbcollect_info zips, one can examine the ns_server.couchdb.log file to get some information about the frequency of queries per day to each view. For example:
grep GET */ns_server.couchdb.log | grep _view | grep -o -E -e ',[0-9]
{4}-[0-9]
{2}-[0-9]{2}' -e '_view/.*?' | paste -s -d ' \n' - | sort | uniq -c | awk '
{sub(/,/,"",$2); sub(/_view\//,"",$3); sub(/\?$/,"",$3); printf "%10i %10s %s\n", $1, $2, $3}'