As a systems administrator, I would like us to automate our currently manual truncation of the msg_log table.
Acceptance Criteria
[ ] Existing users of the IOC Log feature are consulted on their use cases and the age of data they require to be available (see below) and we agree on a retention period
[ ] An automated process is created which runs regularly (<=daily) and checks the msg_log table for entries older than the retention period. A process similar to the current truncation script is then followed with them being dumped, moved to stage_deleted and removed from the table. This needs to be able to run silently from the perspective of the instrument scientist - not interfering with data taking.
[ ] Appropriate checks are in place that this script is running appropriately
[ ] The process is documented in the developer wiki
Extra Information
We currently have a truncate database script which we run manually when disk space is running out on Instrument PCs, or between cycles as part of our housekeeping. This dumps the table contents to a file, then removes them from the DB. This takes up development/support time and its automation would increase efficiency.
By regularly running a process to remove data over x days old, we will give certainty of what age of detail will be available in the Ibex GUI, whilst reducing the effort required in system maintenance.
In order to define how long we keep records in the DB, we need to balance the needs of the users against the disk available. It is believed the current users of the IBEX GUI feature this table supports (IOC Log) are the Muon beam-lines and technical groups. As such we should understand their needs before making the change. It is suggested a good starting point for consultation would be retaining records up to 30 days old (increasing this if there is a clear use case, decreasing it if we find this still results in manual intervention being required to reduce disk usage).
This ticket is a result of the discussion that took place as part of #8321 .
As a systems administrator, I would like us to automate our currently manual truncation of the msg_log table.
Acceptance Criteria
Extra Information
We currently have a truncate database script which we run manually when disk space is running out on Instrument PCs, or between cycles as part of our housekeeping. This dumps the table contents to a file, then removes them from the DB. This takes up development/support time and its automation would increase efficiency.
By regularly running a process to remove data over x days old, we will give certainty of what age of detail will be available in the Ibex GUI, whilst reducing the effort required in system maintenance.
In order to define how long we keep records in the DB, we need to balance the needs of the users against the disk available. It is believed the current users of the IBEX GUI feature this table supports (IOC Log) are the Muon beam-lines and technical groups. As such we should understand their needs before making the change. It is suggested a good starting point for consultation would be retaining records up to 30 days old (increasing this if there is a clear use case, decreasing it if we find this still results in manual intervention being required to reduce disk usage).
This ticket is a result of the discussion that took place as part of #8321 .
See also: developer wiki page.
How to Test
verbose instructions for reviewer to test changes (Add before making a PR)
Discussed ~00:43 20/06/24