Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-11070

Move logging of view queries into stats

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Major
    • feature-backlog
    • 3.0
    • view-engine
    • 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}

      '

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            siri Sriram Melkote (Inactive)
            brent Brent Woodruff (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty