Updated on 2024-09-05 GMT+08:00

Audit and Logs

Audit

  • Cloud Trace Service (CTS)

    CTS records operations on the cloud resources in your account. You can use the logs generated by CTS to perform security analysis, track resource changes, audit compliance, and locate faults.

    For details about how to enable and configure CTS, see Enabling CTS.

    With CTS, you can record operations associated with GaussDB(for MySQL) for future query, audit, and backtracking.

  • Database Security Service (DBSS)

    DBSS is based on machine learning and big data analytics technologies. It provides functions such as database audit, SQL injection attack detection, and risky operation identification to ensure the security of databases on the cloud.

    You are advised to use DBSS to provide extended data security capabilities. For details, see Database Security Service.

    Advantages:

    • DBSS can help you meet security compliance requirements.
      • DBSS can help you comply with DJCP (graded protection) standards for database audit.
      • DBSS can help you comply with security laws and regulations, and provide compliance reports that meet data security standards (such as Sarbanes-Oxley).
    • DBSS can back up and restore database audit logs and meet the audit data retention requirements.
    • DBSS can monitor risks, sessions, session distribution, and SQL distribution in real time.
    • DBSS can report alarms for risky behavior and attacks and respond to database attacks in real time.
    • DBSS can locate internal violations and improper operations and keep data assets secure.

    Deployed in bypass pattern, database audit can perform flexible audits on the database without affecting user services.

    • Database audit monitors database logins, operation types (data definition, operation, and control), and operation objects based on risky operations to effectively audit the database.
    • Database audit analyzes risks and sessions, and detects SQL injection attempts so you can stay apprised of your database status.
    • Database audit provides a report template library to generate daily, weekly, or monthly audit reports according to your configurations. It sends real-time alarm notifications to help you obtain audit reports in a timely manner.

Logs

GaussDB(for MySQL) provides a variety of log types and functions for database analysis or audit. You can view logs on the management console.

  • Error logs

    GaussDB(for MySQL) allows you to view database-level logs, including error logs and slow SQL query logs.

  • Slow query logs

    Slow query logs record statements that exceed long_query_time (10 seconds by default). You can view log details and statistics to identify slow statements, so you can optimize them.

  • SQL Explorer

    Enabling SQL Explorer will allow GaussDB(for MySQL) to store all SQL statement logs for analysis.

    SQL Explorer is disabled by default.

    If SQL Explorer is enabled, you can use DAS to view average execution duration, total execution duration, average lock wait time, average rows scanned, and the like.