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
68
68
# MySQL 8.x (NOT MariaDB!)
69
69
```
70
70
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
+
71
76
That's it! You are now done and you have setup MySQL partitioning. We could execute the script manually with:
72
77
```
73
78
perl /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 {
182
182
sub delete_old_data {
183
183
$dbh -> do(" DELETE FROM sessions WHERE lastaccess < UNIX_TIMESTAMP(NOW() - INTERVAL 1 MONTH)" );
184
184
$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)");
186
187
}
You can’t perform that action at this time.
0 commit comments