Use the db-audit-logs-exporter
resource to configure database audit logs for export to third-party tools.
Syntax
Usage: ybm db-audit-logs-exporter [command] [flags]
Example
Assign a configuration to a cluster:
ybm db-audit-logs-exporter assign \
--cluster-name my_cluster \
--integration-name datadog1 \
--statement_classes=READ,WRITE \
--ysql-config==log_catalog=true,log_client=false,log_level=INFO,log_parameter=true
Commands
assign
Export the specified cluster's database audit logs using the specified integration configuration.
Flag | Description |
---|---|
--cluster-name | Required. Name of the cluster. |
--integration-name | Required. The name of the integration configuration you are using to export the logs to. |
--statement-classes | Required. The YSQL statements to log, provided as key-value pairs. Arguments:
|
--ysql-config | Required. The pgaudit options, provided as key-value pairs. Arguments:
|
list
List the database audit log export settings for a cluster.
Flag | Description |
---|---|
--cluster-name | Required. Name of the cluster. |
unassign
Remove the database audit log export configuration from the specified cluster.
Flag | Description |
---|---|
--cluster-name | Required. Name of the cluster. |
--export-config-id | Required. The ID of the DB audit export configuration. |
update
Update a database audit log export configuration.
Flag | Description |
---|---|
--cluster-name | Required. Name of the cluster. |
--export-config-id | Required. The ID of the DB audit export configuration. |
--integration-name | Required. The name of the integration configuration you are using to export the logs. |
--statement-classes | Required. The YSQL statements to log, provided as key-value pairs. Arguments:
|
--ysql-config | Required. The pgaudit options, provided as key-value pairs. Arguments:
|