Automatically purging invocation history
If you are monitoring Service REST rules, the invocation history can become large and take up space in the database. You can purge invocation history automatically to delete data that you no longer need from the database.
To automatically purge invocation history, you use a Dynamic System Setting and an agent that must be enabled and configured. The
service/MonitorInstanceTTLMins
Dynamic System Setting specifies how old, in minutes, the invocation history must be for the
pzCleanupServiceMonitorInstances
agent to delete it. For example, if the setting is 70 minutes, when the agent runs, it removes all invocation history instances that are older than 70 minutes.
Configuring how long to keep invocation history
- Click Create > SysAdmin > Dynamic System Settings.
- Enter a short description that identifies the setting.
- In the Owning Ruleset field, enter Pega-IntegrationEngine.
- In the Setting Purpose field, enter service/MonitorInstanceTTLMins.
- Click Create and open.
- In the Value field, enter the number of minutes to keep invocation history before deleting it.
- Click Save.
Enabling and configuring the agent
By default, the pzCleanupServiceMonitorInstances agent is not enabled.
The interval configured for how often the agent wakes up and runs is not the same as the number of minutes to keep invocation history. For example, if the agent is configured to run every 15 minutes and the number of minutes to keep invocation history is set to 10 minutes, the agent runs every 15 minutes and deletes invocation history that is older than 10 minutes.
- Click Designer Studio > System > Operations > Agent Management .
- Click the pzCleanupServiceMonitorInstances agent to open the agent schedule.
- In the Interval field for the pzCleanupServiceMonitorInstances agent, enter the frequency, in minutes, that you want the agent to run.
- Click Save.
- Select the check box in front of the agent name.
- Click Start.