GaussDB(DWS) records information (audit logs) about connections and user activities in your database. With the information, you can monitor the database to ensure security and facilitate fault troubleshooting and historical operation record locating. These audit logs are stored in the database by default. You can also dump them to OBS so that users who are responsible for monitoring the database can view the logs more conveniently.
You can perform the following operations on the GaussDB(DWS) console:
After a data warehouse cluster is created, you can enable audit log dump for it to dump audit logs to OBS.
Before enabling audit log dump, ensure that the following conditions are met:
The procedure is as follows:
indicates that the function is enabled.
indicates that the function is disabled.
When you enable audit log dump for a project in a region for the first time, the system prompts you to create an agency named DWSAccessOBS. After the agency is created, GaussDB(DWS) can dump audit logs to OBS. By default, only cloud accounts or users with Security Administrator permissions can create agencies. IAM users under an account do not have the permission for creating agencies by default. Contact a user with the permission and complete the authorization on the current page.
If Configuration Status is Applying, the system is saving the settings.
Wait for a moment and then refresh Configuration Status. When Configuration Status is Synchronized, the configuration is saved and takes effect.
After audit log dump is enabled, you can modify the dump configurations, for example, modifying the OBS bucket, path, and dump interval.
The procedure is as follows:
If Configuration Status is Applying, the system is saving the settings.
Wait for a moment and then refresh Configuration Status. When Configuration Status is Synchronized, the configuration is saved and takes effect.
After audit log dump is enabled, you can view the dumped audit logs on OBS.
The procedure is as follows:
You can download and decompress the files to view. The fields of audit log files are described as follows:
Name |
Description |
---|---|
time |
Indicates the operation time. |
type |
Indicates the operation type. |
result |
Indicates the operation result. |
username |
Indicates the name of the user who initiates the operation. |
database |
Indicates the database name. |
client_conninfo |
Indicates the client connection information. |
object_name |
Indicates the operation object name. |
detail_info |
Indicates the detailed information about the operation. |
node_name |
Indicates the node name. |
thread_id |
Indicates the thread ID. |
local_port |
Indicates the local port. |
remote_port |
Indicates the remote port. |
You can disable audit log dumps if you do not want to dump audit logs to OBS.
The procedure is as follows:
indicates that the function is disabled.
If Configuration Status is Applying, the system is saving the settings.
Wait for a moment and then refresh Configuration Status. When Configuration Status is Synchronized, the configuration is saved and takes effect.