mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-06-03 19:52:07 +02:00
bicep/mysql: rotate slow query logs
This commit is contained in:
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user