File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ MAKE SURE TO UNCOMMENT THE CORRECT LINES FOR THE VERSION YOU NEED. Check the blo
6868# MySQL 8.x (NOT MariaDB!)
6969```
7070
71+ Uncomment the following line for Zabbix 5.4 and OLDER:
72+ ```
73+ # $dbh->do("DELETE FROM auditlog_details WHERE NOT EXISTS (SELECT NULL FROM auditlog WHERE auditlog.auditid = auditlog_details.auditid)");
74+ ```
75+
7176That's it! You are now done and you have setup MySQL partitioning. We could execute the script manually with:
7277```
7378perl /usr/share/zabbix/mysql_zbx_part.pl
Original file line number Diff line number Diff line change @@ -182,5 +182,6 @@ sub date_next_part {
182182sub delete_old_data {
183183 $dbh -> do(" DELETE FROM sessions WHERE lastaccess < UNIX_TIMESTAMP(NOW() - INTERVAL 1 MONTH)" );
184184 $dbh -> do(" TRUNCATE housekeeper" );
185- $dbh -> do(" DELETE FROM auditlog_details WHERE NOT EXISTS (SELECT NULL FROM auditlog WHERE auditlog.auditid = auditlog_details.auditid)" );
185+ # Uncomment the following line for Zabbix 5.4 and earlier
186+ # $dbh->do("DELETE FROM auditlog_details WHERE NOT EXISTS (SELECT NULL FROM auditlog WHERE auditlog.auditid = auditlog_details.auditid)");
186187}
You can’t perform that action at this time.
0 commit comments