Skip to content
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

[DOC-580][CLOUDGA-24950][ybm][cli] DB Query logging cli commands #25213

Merged
merged 7 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add to global and remove quotes
  • Loading branch information
sudhanshu456 committed Dec 17, 2024
commit 3cde8aa5646b5a3611f4e297b7efa40d483cb5d3
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 69,7 @@ You can manage the following resources using ybm:
| [cluster](managed-cli-cluster/) | cert download, create, delete, describe,</br>encryption list, encryption update,</br>list, node list, pause, resume, update |
| [cluster network](managed-cli-network/) | allow-list assign, allow-list unassign,</br>endpoint create, endpoint delete , endpoint describe,</br>endpoint list, endpoint update |
| [cluster read-replica](managed-cli-read-replica/) | create, delete, list, update |
| [cluster db-query-logging](managed-cli-db-query-logging/) | enable, disable, describe, update |
| [integration](managed-cli-integration/) | create, delete, list |
| [metrics-exporter](managed-cli-metrics-exporter/) [deprecated] | assign, create, delete, describe, list, pause, unassign, update |
| [network-allow-list](managed-cli-network-allow-list/) | create, delete, list |
Expand Down Expand Up @@ -96,6 97,9 @@ Use the following commands to configure ybm:

The following flags can be passed in with any command. These flags can also be added to your configuration file (see [Configure ybm](../managed-cli-overview/#configure-ybm)).

-h, --help
sudhanshu456 marked this conversation as resolved.
Show resolved Hide resolved
: Displays help information for ybm CLI commands.

-a, --apiKey string
: YugabyteDB Aeon account API Key.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 35,12 @@ Enable database query logging for a cluster:
ybm cluster db-query-logging enable \
--cluster-name your-cluster \
--integration-name your-integration \
--log-line-prefix "%m :%r :%u @ %d :[%p] : %a :" \
--log-min-duration-statement 30 \
--log-connections true \
--log-line-prefix "%m :%r :%u @ %d :[%p] : " \
--log-min-duration-statement -1 \
--log-connections false \
--log-duration false \
--log-error-verbosity DEFAULT \
--log-statement MOD
--log-statement NONE
```

Disable database query logging for a cluster.
Expand All @@ -59,7 59,7 @@ ybm cluster db-query-logging describe --cluster-name your-cluster
Update some fields of the log configuration.

```sh
$ ybm cluster db-query-logging update \
ybm cluster db-query-logging update \
--cluster-name "your-cluster" \
--integration-name your-integration \
--log-line-prefix "%m :%r :%u @ %d :[%p] :" \
Expand All @@ -76,15 76,15 @@ Enable database query logging for a cluster and export the logs to the integrati
| :--- | :--- |
| --cluster-name | Required. Name of the cluster whose database logging you want to enable. |
| --integration-name | Required. Name of the integration that you want to use to export the logs. |
| --debug-print-plan | Optional. Enables output of debugging output. Default is `"false"`. |
| --debug-print-plan | Optional. Enables output of debugging output. Default is `false`. |
| --log-min-duration-statement | Optional. Duration (in ms) of each completed statement to be logged if the statement ran for at least the specified amount of time. Default is `-1` (log all statements). |
| --log-connections | Optional. Log connection attempts. Default is `"false"`. |
| --log-disconnections | Optional. Log session disconnections. Default is `"false"`. |
| --log-duration | Optional. Log the duration of each completed statement. Default is `"false"`. |
| --log-error-verbosity | Optional. Controls the amount of detail written in the server log for each message that is logged.<br>Arguments:<br><ul><li>`DEFAULT` - Standard verbosity level.</li><li>`TERSE` - Minimal detail.</li><li>`VERBOSE` - Maximum detail.</li></ul>Default is `"DEFAULT"`. |
| --log-statement | Optional. Log all statements or specific types of statements.<br>Arguments:<br><ul><li>`NONE` - Do not log any statements.</li><li>`DDL` - Log data definition language statements.</li><li>`MOD` - Log data modification statements.</li><li>`ALL` - Log all statements.</li></ul>Default is `"NONE"`. |
| --log-min-error-statement | Optional. Minimum error severity for logging the statement that caused it.<br>Arguments:<br><ul><li>`ERROR` - Log statements causing errors.</li></ul>Default is `"ERROR"`. |
| --log-line-prefix | Optional. A printf-style format string for log line prefixes. Default is `"%m :%r :%u @ %d :[%p] :"`. |
| --log-connections | Optional. Log connection attempts. Default is `false`. |
| --log-disconnections | Optional. Log session disconnections. Default is `false`. |
| --log-duration | Optional. Log the duration of each completed statement. Default is `false`. |
| --log-error-verbosity | Optional. Controls the amount of detail written in the server log for each message that is logged.<br>Arguments:<br><ul><li>`DEFAULT` - Standard verbosity level.</li><li>`TERSE` - Minimal detail.</li><li>`VERBOSE` - Maximum detail.</li></ul>Default is `DEFAULT`. |
| --log-statement | Optional. Log all statements or specific types of statements.<br>Arguments:<br><ul><li>`NONE` - Do not log any statements.</li><li>`DDL` - Log data definition language statements.</li><li>`MOD` - Log data modification statements.</li><li>`ALL` - Log all statements.</li></ul>Default is `NONE`. |
| --log-min-error-statement | Optional. Minimum error severity for logging the statement that caused it.<br>Arguments:<br><ul><li>`ERROR` - Log statements causing errors.</li></ul>Default is `ERROR`. |
| --log-line-prefix | Optional. A printf-style format string for [log line prefixes](../../../cloud-monitor/logging-export.md/#include-in-the-log-prefix-log-line-prefix). Default is `%m :%r :%u @ %d :[%p] :`. |
sudhanshu456 marked this conversation as resolved.
Show resolved Hide resolved

### disable

Expand Down Expand Up @@ -112,7 112,6 @@ Update the database query logging configuration of a cluster.
| :--- | :--- |
| --cluster-name | Required. Name of the cluster with database query logging configuration you want to update. |
| --debug-print-plan | Optional. Enables output of debugging output. |
| -h, --help | Help for update. |
| --integration-name | Optional. Name of the Integration. |
| --log-connections | Optional. Log connection attempts. |
| --log-disconnections | Optional. Log session disconnections. |
Expand Down