diff --git a/modules/cli/pages/cbqueryreportgen.adoc b/modules/cli/pages/cbqueryreportgen.adoc new file mode 100644 index 0000000000..ee4613924c --- /dev/null +++ b/modules/cli/pages/cbqueryreportgen.adoc @@ -0,0 +1,72 @@ += 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 [- + [ -c, --cluster ] + [ -u, --username ] + [ -p, --password ] + [ -k, --keyspace ] + [ -t1, --time-period ] + [ -o, --output ] + [ --report-type ] + [ --output-file ] + [ --format ] + [ -l, --limit ] + [ -v, --verbose ] + [ -h, --help ] + ] +---- + + +== Description + +The `cbqueryreportgen` command connects to a Couchbase cluster and generates performance reports based on the Query Service's AWR statistics. + +The tool allows users to specify a time range for the report, 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 `--cluster` flag specifies the hostname of the Couchbase cluster. Example: `cbqueryreportgen couchbase://localhost`. + +The `--username` flag specifies the username of the Couchbase cluster. Example: `cbqueryreportgen --username Administrator`. + +The `--password` flag specifies the password of the Couchbase cluster. Example: `cbqueryreportgen --password password`. + +The `--keyspace` flag specifies the keyspace where the AWR stats are read from. Example: `cbqueryreportgen --keyspace travel-sample._default.awr`. + +The `--time-period` flag specifies the time period for the report. The required format is `start-time,end-time` in the format `YYYY-MM-DDTHH:MM:SS`. Example: `2025-10-01T00:00:00,2025-10-02T00:00:00`. + +The `--output` flag specifies the output file to write the report to. Example: `cbqueryreportgen --output report.html`. + +optional Flags: + +The `--report-type` flag specifies the type of report to generate. Supported values are 'AWR' and 'ADHOC'. Default is 'AWR'(Automatic Workload Repository). + +The `--output-file` flag specifies the file path where the report will be saved. If not provided, the report will be printed to stdout. + +The `--format` flag specifies the format of the report. `HTML` is the default format. + +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`. + +The `--version` flag prints to the console the version number of the Couchbase Server. + +== See Also + +For detailed information, see xref:n1ql:n1ql-manage/query-awr.adoc[Automatic Workload Repository]. diff --git a/modules/cli/pages/cli-intro.adoc b/modules/cli/pages/cli-intro.adoc index 588fa351e5..a478d478f9 100644 --- a/modules/cli/pages/cli-intro.adoc +++ b/modules/cli/pages/cli-intro.adoc @@ -49,6 +49,7 @@ The Server developer tools package lets you install the following EE Server util * xref:tools:cbexport.adoc[`cbexport`] * xref:tools:cbimport.adoc[`cbimport`] * xref:cli:cbq-tool.adoc[`cbq`] +* xref:cli:cbqueryreportgen.adoc[`cbqueryreportgen`] Download the command line tools package for your platform from the following links: @@ -84,6 +85,7 @@ The Server admin tools package lets you install the following Server utilities o * xref:tools:cbimport.adoc[`cbimport`] * xref:cli:cbq-tool.adoc[`cbq`] * xref:cli:cbstats-intro.adoc[`cbstats`] +* xref:cli:cbqueryreportgen.adoc[`cbqueryreportgen`] * xref:cli:cbcli/couchbase-cli.adoc[`couchbase-cli`] * xref:cli:mcstat.adoc[`mcstat`] * xref:cli:mctimings.adoc[`mctimings`] @@ -116,7 +118,7 @@ If you do not have these libraries installed, download them from https://docs.mi The versions of the utilities installed by the tools package are the same as the corresponding Couchbase Server installation package. -For Server developer tools package, the {tools-ver} version of `cbimport`, `cbexport`, `cbbackupmgr`, and `cbq` utilities are compatible with the following Couchbase Server versions: +For the Server developer tools package, the {tools-ver} version of `cbimport`, `cbexport`, `cbbackupmgr`, and `cbq` utilities are compatible with the following Couchbase Server versions: * 8.0.x * 7.6.x @@ -125,7 +127,9 @@ For Server developer tools package, the {tools-ver} version of `cbimport`, `cbex You can download and use the latest version of the utilities (`cbimport`, `cbexport`, `cbbackupmgr`, and `cbq`) with earlier Couchbase Server versions. -For Server admin tools package, do the following: +The `cbqueryreportgen` utility is supported only on Couchbase Server 8.0 or later. + +For the Server admin tools package, do the following: * Use the `--version` option to get the version of the utility. However, for the `cbc` utility, use the `cbc version` option. * `couchbase-cli` is a utility for administering the Couchbase cluster. Make sure that the versions of `couchbase-cli` and the Couchbase cluster match.