AMPS supports an action to help manage the size of the statistics database.
- amps-action-do-truncate-statistics removes statistics that are older than a certain timeframe
Actions are configured in the Actions section of your AMPS configuration. You can set up actions to run on a timer, at a specific time of day, at a specific time of day on a specific day of the week, when AMPS starts up or shuts down, or in response to a Linux signal. For example, you could configure the actions like this to remove statistics older than one day and shrink the files, with the action running every day at 12:30 AM.
<Actions> <Action> <On> <Module>amps-action-on-schedule</Module> <Options> <Every>00:30</Every> <Name>Nightly Statistics Maintenance</Name> </Options> </On> <Do> <Module>amps-action-do-truncate-statistics</Module> <Options> <Age>1d</Age> </Options> </Do> </Action> </Actions>
The full syntax for actions is described in the AMPS User Guide and AMPS Configuration Reference.
Although AMPS provides an action for vacuuming the statistics database, 60East does not recommend this action for typical use. The vacuum action can take an extended period of time, and while that action is running, the AMPS admin interface is offline. This can be interpreted as a service outage in many environments.
keywords: AMPS maintenance, statistics database size, statistics file size