-
Notifications
You must be signed in to change notification settings - Fork 183
DOC-12541 new query report generation tool #3905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
supritha-kumar
merged 11 commits into
release/8.0
from
DOC-12541_new_query_report_generation_tool
Oct 15, 2025
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b07178f
DOC-12541 Added a new file and modified the cli-intro file
Pallavi-Janardhan 4f13f6e
DOC-12541 Added a new file and modified the cli-intro file
Pallavi-Janardhan 86e58c0
DOC-12541 Added a new file and modified the cli-intro file
Pallavi-Janardhan c0e0e5f
DOC-12541 Added a new file and modified the cli-intro file
Pallavi-Janardhan d837ae4
Update modules/cli/pages/cbqueryreportgen.adoc
Pallavi-Janardhan 5da7b6a
Update modules/cli/pages/cbqueryreportgen.adoc
Pallavi-Janardhan de8e253
Incorporating review comments
Pallavi-Janardhan 92a7f0b
Incorporating SME tech review comments
Pallavi-Janardhan 9220009
Made few corrections to the doc
Pallavi-Janardhan 2d5117e
Made the suggested corrections by the SME lead to the doc
Pallavi-Janardhan 6faeaee
updated as per https://github.com/couchbase/docs-server/pull/3905
supritha-kumar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
= cbqueryreportgen | ||
:description: pass:q[The `cbqueryreportgen` tool returns the complete details of any Query service to generate reports.] | ||
:page-status: Couchbase Server 8.0 | ||
:page-component: Query | ||
ifndef::doctype-manpage[:doctitle: cbqueryreportgen] | ||
:page-component-version: 8.0 | ||
:page-topic-type: reference | ||
|
||
[abstract] | ||
A query tool that returns the complete details of any Query Service to generate reports. | ||
|
||
== Syntax | ||
|
||
---- | ||
cbqueryreportgen [-<args> | ||
[ -c, --cluster <cluster> ] | ||
[ -u, --username <username> ] | ||
[ -p, --password <password> ] | ||
[ -k, <keyspace> ] | ||
[ -t1, <start-time>,<end-time> ] | ||
[ -t2, <start-time>,<end-time> ] | ||
[ -o, --output <output> ] | ||
[ -l, --limit <limit> ] | ||
[ -v, --verbose ] | ||
[ -h, --help ] | ||
] | ||
---- | ||
|
||
|
||
== Description | ||
|
||
ifeval::['{page-component-version}' == '8.0'] | ||
This tool is only available in Couchbase Server 8.0 and later. | ||
endif::[] | ||
|
||
The `cbqueryreportgen` command connects to a Couchbase cluster and generates performance reports based on the Query Service's AWR statistics. | ||
|
||
The tool allows you to specify a time range for the report. You can specify 2 different time periods, allowing a report to be generated that compares query statistics over the different time periods. You can also specify the output file where the report must be saved. The output of the command is a report in HTML format. | ||
|
||
Depending upon your platform, this tool is at the following locations: | ||
|
||
[cols="1,3"] | ||
|=== | ||
| Operating system | Location | ||
|
||
| Linux | ||
| [.path]`/opt/couchbase/bin/` | ||
|
||
| Windows | ||
| [.path]`C:\Program Files\Couchbase\Server\bin\` | ||
|
||
| Mac OS X | ||
| [.path]`/Applications/CouchbaseServer.app/Contents/Resources/couchbase-core/bin/` | ||
|=== | ||
|
||
== Options | ||
|
||
Required flags: | ||
|
||
The following flags are required to run the `cbqueryreportgen` command. | ||
|
||
The `-c, --cluster` flag specifies the hostname of the Couchbase cluster. Example: `couchbase://localhost`. | ||
|
||
The `-u, --username` flag specifies the username of the Couchbase cluster. Example: `-u Administrator`. | ||
|
||
The `-p, --password` flag specifies the password of the Couchbase cluster. Example: `-p password`. | ||
|
||
The `-k` flag specifies the keyspace. The keyspace is the AWR repository in the `bucket.scope.collection` format. Example: `travel-sample._default.awr`. | ||
|
||
The `-t1` flag specifies the start-time and end-time for the report, in the local timezone. Enter both start-time and end-time in the `YYYY-MM-DDTHH:MM:SS` format, separated by a comma. Example: `2025-09-01T00:00:00,2025-09-02T00:00:00`. | ||
|
||
The `-o, --output` flag specifies the output file for the report. Example: `report.html`. | ||
|
||
Optional flags: | ||
simon-dew marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The `-t2` flag specifies the start-time and end-time of the second time period, in the local timezone. Enter both start-time and end-time in the `YYYY-MM-DDTHH:MM:SS` format, separated by a comma. Example: `2025-09-02T00:00:00,2025-09-03T00:00:00`. | ||
|
||
The `-l, --limit` flag specifies the maximum number of results to include for every query. The default is `1000`. | ||
|
||
The `-v, --verbose` flag enables verbose logging for debugging purposes. | ||
|
||
The `-h, --help` flag prints the help information. | ||
|
||
For more information about how the specific command works, run `cbqueryreportgen --help`. | ||
|
||
== Example | ||
|
||
This example creates a report showing all of the statistics for a single day. | ||
The AWR repository is `travel-sample._default.awr`. It's assumed that you have already specified this as the AWR repository, and created an index on the document key in the configured AWR location. | ||
|
||
==== | ||
[source,sh] | ||
---- | ||
cbqueryreportgen -c couchbase://localhost \ | ||
-u Administrator -p password \ | ||
-k travel-sample._default.awr \ | ||
-o report.html \ | ||
-t1 '2025-09-01T00:00:00,2025-09-01T23:59:59' | ||
---- | ||
==== | ||
|
||
The output of the command is a report in HTML format, saved to the file `report.html`. | ||
|
||
== See Also | ||
Pallavi-Janardhan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
For detailed information, see xref:n1ql:n1ql-manage/query-awr.adoc[Automatic Workload Repository]. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.