Skip to content

Conversation

Pallavi-Janardhan
Copy link
Contributor

@Pallavi-Janardhan Pallavi-Janardhan commented Sep 30, 2025

Jira: DOC-12541

Added info about the new utility, cbqueryreportgen, to the CLI Reference doc.

Docs preview

Preview credentials

@simon-dew simon-dew changed the title Doc 12541 new query report generation tool DOC-12541 new query report generation tool Oct 3, 2025
@simon-dew simon-dew changed the base branch from release/8.0 to release/7.6 October 3, 2025 12:44
@simon-dew simon-dew force-pushed the DOC-12541_new_query_report_generation_tool branch from e2b7465 to 3d84a55 Compare October 3, 2025 12:45
@simon-dew simon-dew changed the base branch from release/7.6 to release/8.0 October 3, 2025 12:46
@simon-dew simon-dew changed the base branch from release/8.0 to release/7.6 October 3, 2025 12:47
@simon-dew
Copy link
Contributor

This PR targets release/8.0 but I think it must have been based on release/7.6 originally. I'll try to sort this out.

@simon-dew simon-dew force-pushed the DOC-12541_new_query_report_generation_tool branch from 3d84a55 to c0e0e5f Compare October 3, 2025 13:03
@simon-dew simon-dew changed the base branch from release/7.6 to release/8.0 October 3, 2025 13:03
@simon-dew
Copy link
Contributor

Okay I have recreated this PR to start from release/8.0, and cherry-picked the new changes on top. @Pallavi-Janardhan please do git pull origin DOC-12541_new_query_report_generation_tool before you do any further work on this branch locally.

Copy link
Contributor

@simon-dew simon-dew left a 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]

Copy link
Contributor

@simon-dew simon-dew left a 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 ! 🎉

Copy link

@safianalicb safianalicb left a 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

Copy link

@safianalicb safianalicb left a 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.

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.

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> ]

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`.

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> ]

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> ]

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.

Copy link
Contributor

@simon-dew simon-dew left a 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> ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[ -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> ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Contributor

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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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`.

@Pallavi-Janardhan Pallavi-Janardhan force-pushed the DOC-12541_new_query_report_generation_tool branch from 441bc76 to 2d5117e Compare October 9, 2025 17:51
@Pallavi-Janardhan
Copy link
Contributor Author


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`.

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`.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants