-
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
base: release/8.0
Are you sure you want to change the base?
DOC-12541 new query report generation tool #3905
Conversation
e2b7465
to
3d84a55
Compare
This PR targets |
3d84a55
to
c0e0e5f
Compare
Okay I have recreated this PR to start from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Pallavi-Janardhan , as well as addressing the comments below, please can you add a link to the cbqueryreportgen.adoc
file in the server navigation file /modules/ROOT/nav.adoc
? Put the link in the Reference
section, after cbq
and before cbrecovery
:
** xref:cli:cbq-tool.adoc[cbq]
** xref:cli:cbqueryreportgen.adoc[cbqueryreportgen]
** xref:cli:cbtools/cbrecovery.adoc[cbrecovery]
Co-authored-by: Simon Dew <[email protected]>
Co-authored-by: Simon Dew <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
Thanks @Pallavi-Janardhan ! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please correct the flags given under the "Syntax" section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still some mistakes here e.g. long option flags that don't exist.
|
||
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 type of report and the output format. By default, the output of the command is a report in HTML format. You can save the generated report to a file or print it to the standard output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not true. The only output format is HTML
|
||
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 type of report and the output format. By default, the output of the command is a report in HTML format. You can save the generated report to a file or print it to the standard output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also not true. You must specify an output file
[ -u, --username <username> ] | ||
[ -p, --password <password> ] | ||
[ -k, --keyspace <keyspace> ] | ||
[ -t1, --start-time <start-time> ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both -t1
and -t2
have their own separate start-time and end-time values
---- | ||
==== | ||
|
||
The output of the command is a report in HTML format, saved to the file `cbqueryreportgen.html`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example above would save the report at report.html
[ -u, --username <username> ] | ||
[ -p, --password <password> ] | ||
[ -k, --keyspace <keyspace> ] | ||
[ -t1, --start-time <start-time> ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no long option for either t1 or t2
[ -c, --cluster <cluster> ] | ||
[ -u, --username <username> ] | ||
[ -p, --password <password> ] | ||
[ -k, --keyspace <keyspace> ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no long option for --k
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some suggested changes following Safian's review
[ -u, --username <username> ] | ||
[ -p, --password <password> ] | ||
[ -k, --keyspace <keyspace> ] | ||
[ -t1, --start-time <start-time> ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ -t1, --start-time <start-time> ] | |
[ -t1 <start-time>,<end-time> ] |
[ -p, --password <password> ] | ||
[ -k, --keyspace <keyspace> ] | ||
[ -t1, --start-time <start-time> ] | ||
[ -t2, --end-time <end-time> ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ -t2, --end-time <end-time> ] | |
[ -t2 <start-time>,<end-time> ] |
|
||
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 type of report and the output format. By default, the output of the command is a report in HTML format. You can save the generated report to a file or print it to the standard output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 type of report and the output format. By default, the output of the command is a report in HTML format. You can save the generated report to a file or print it to the standard output. | |
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 type of report and the output format. The output of the command is a report in HTML format. You can save the generated report to a file or print it to the standard output. |
|
||
The `-p, --password` flag specifies the password of the Couchbase cluster. Example: `cbqueryreportgen --password password`. | ||
|
||
The `-k, --keyspace` flag specifies the keyspace. The keyspace is the AWR repository in the `bucket.scope.collection` format. Example: `travel-sample._default.awr`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `-k, --keyspace` flag specifies the keyspace. The keyspace is the AWR repository in the `bucket.scope.collection` format. Example: `travel-sample._default.awr`. | |
The `-k` flag specifies the keyspace. The keyspace is the AWR repository in the `bucket.scope.collection` format. Example: `travel-sample._default.awr`. |
|
||
The `-k, --keyspace` flag specifies the keyspace. The keyspace is the AWR repository in the `bucket.scope.collection` format. Example: `travel-sample._default.awr`. | ||
|
||
The `-t1` and `-t2` flags specify the start-time and end-time for the report. Enter both start-time and end-time as `t1,t2` in the `YYYY-MM-DDTHH:MM:SS` format. Example: `2025-09-01T00:00:00,2025-09-02T00:00:00`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `-t1` and `-t2` flags specify the start-time and end-time for the report. Enter both start-time and end-time as `t1,t2` in the `YYYY-MM-DDTHH:MM:SS` format. Example: `2025-09-01T00:00:00,2025-09-02T00:00:00`. | |
The `-t1` flag specifies the start-time and end-time for the report. 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 to write the report to. Example: `cbqueryreportgen.html`. | ||
|
||
Optional flags: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to explain the -t2
flag in this section
---- | ||
==== | ||
|
||
The output of the command is a report in HTML format, saved to the file `cbqueryreportgen.html`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output of the command is a report in HTML format, saved to the file `cbqueryreportgen.html`. | |
The output of the command is a report in HTML format, saved to the file `report.html`. |
441bc76
to
2d5117e
Compare
Have made all the required/suggested changes. The preview link is |
|
||
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. 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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention here and for t2 that the times need to be in the local timezone
|
||
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: `cbqueryreportgen -p password`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inconsistency in around whether cbqueryreportgen
is prepended to examples. I'd prefer without it, but regardless you should be consistent
Jira: DOC-12541
Added info about the new utility, cbqueryreportgen, to the CLI Reference doc.
Docs preview
Preview credentials