ISISComputingGroup / IBEX

Top level repository for IBEX stories
4 stars 2 forks source link

MySQL msg_log: Automate truncation #8364

Open GRyall opened 1 month ago

GRyall commented 1 month ago

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