bicep/mysql: rotate slow query logs

This commit is contained in:
h7x4
2026-06-03 15:21:18 +09:00
parent 3386153b8b
commit 39d313579c
+12
View File
@@ -71,4 +71,16 @@ in
];
};
};
services.logrotate = lib.mkIf (cfg.settings.mysqld.slow-query-log == 1) {
enable = true;
settings.mysql-slowlog = {
files = [ cfg.settings.mysqld.slow-query-log-file ];
frequency = "weekly";
rotate = 12;
create = "0660 mysql mysql";
minsize = "1M";
compress = true;
};
};
}