Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-5667

audit_log plugin not rotating logs

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • None
    • 5.6.43-84.3
    • None
    • Server version: 5.6.37-82.2-log Percona Server (GPL), Release 82.2, Revision d1eb51005df

       

      Running on Centos 7

    Description

      Running into an issue with the audit_log plugin is not rotating log files when reaching the rotation size. Logs continue to be written to the same file. 

      my.cnf

      audit_log_file = /var/log/mysql_audit.log
      audit_log_format = JSON
      audit_log_handler = FILE
      audit_log_policy = ALL
      audit_log_rotate_on_size = 1024M
      audit_log_rotations = 10
      audit_log_strategy = ASYNCHRONOUS
      
      mysql> show global variables like 'audit%';
      +----------------------------+--------------------------+
      | Variable_name              | Value                    |
      +----------------------------+--------------------------+
      | audit_log_buffer_size      | 1048576                  |
      | audit_log_exclude_accounts |                          |
      | audit_log_exclude_commands |                          |
      | audit_log_file             | /var/log/mysql_audit.log |
      | audit_log_flush            | OFF                      |
      | audit_log_format           | JSON                     |
      | audit_log_handler          | FILE                     |
      | audit_log_include_accounts |                          |
      | audit_log_include_commands |                          |
      | audit_log_policy           | ALL                      |
      | audit_log_rotate_on_size   | 1073741824               |
      | audit_log_rotations        | 10                       |
      | audit_log_strategy         | ASYNCHRONOUS             |
      | audit_log_syslog_facility  | LOG_USER                 |
      | audit_log_syslog_ident     | percona-audit            |
      | audit_log_syslog_priority  | LOG_INFO                 |
      +----------------------------+--------------------------+
      16 rows in set (0.00 sec)
      
      $ls -lah
      -rw-r-----.  1 mysql  mysql  1.8G May 30 15:30 mysql_audit.log

      File should have rotated at around 1.0 GB. Any idea what may be causing the issue?

      Attachments

        Issue Links

          Activity

            People

              lalit.choudhary Lalit Choudhary
              Will-Low Will Springer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist