Go to SettingsGlobal SettingsAdvanced, locate Retention time of Monitoring data and Retention size of Monitoring data, and set their values as needed.