How can I control the size of the statistics database?
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 Configuration Guide.
Last updated