How to adjust the purge interval for the vRealize Automation postgres database ebs_event table
search cancel

How to adjust the purge interval for the vRealize Automation postgres database ebs_event table

book

Article ID: 326164

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

In some cases, the ebs_event table in the vRealize Automation postgres database can grow quickly enough that it can fill the filesystem causing an outage. This article outlines how to adjust the purge interval for records in this table to prevent this from occurring.

Environment

VMware vRealize Automation 7.3.x
VMware vRealize Orchestrator 7.0.x
VMware vRealize Automation 7.1.x
VMware vRealize Orchestrator 7.4.x
VMware vRealize Automation 7.2.x
VMware vRealize Orchestrator 7.1.x
VMware vRealize Automation 7.0.x
VMware vRealize Automation 7.5.x
VMware vRealize Orchestrator 7.2.x
VMware vRealize Automation 7.4.x
VMware vRealize Orchestrator 7.3.x
VMware vRealize Orchestrator 7.5.x

Cause

This can be caused by a large number of event broker subscriptions being executed in a relatively short period of time. 
  • The default interval for retention of the events is 90 days.
  • The default time for executing the event purge is 1AM every day.
Both of these values can be adjusted.

Resolution

Before performing either of the methods outlined below, best practice dictates you first snapshot the vRealize Automation appliance and manually backup the vRealize Automation postgres database.

To adjust the retention of events in ebs_event:

  1. Download the attached workflow, configure_event_retention.v1.0.0.workflow
  2. Import this workflow into the vRO instance you use with vRA
  3. Run the workflow as a vRA system administrator (e.g. [email protected])
  4. If no host entry exists with this system administrator user, create one:
    1. Use the "Library > vRealize Automation > Configuration > Add a vRA host" workflow to add a vRA host for the vsphere.local tenant. Please use the credentials of the system admin here ([email protected])
    2. Use the updated "Configure event retention interval" workflow:
    3. Select "No" for "Use default vRA host for vsphere.local tenant"
    4. Select the host you just created for "vRA host"
    5. Set the retention period in days to your liking
    6. Submit the workflow and check the logs
  5. A successful run will write a message like "You have configured event purge interval of N days" in the logs tab, where N is the value entered for the retention period.

To adjust the time when the event purge is executed:

  1. Open an SSH session to the vRA appliance
  2. Edit the file /etc/vcac/vcac.properties
  3. Add the below line to set the execution time of the cron job.
    • data.purge.eventlog.cron=* 10 15 * * ?
    • This example will execute the event purge at 3:15 PM (1510 in 24hr time). 
    • The 5 'fields' after the '=' above represent sec|min|hour|day|month. So here we execute on all (*) seconds, days, and months; but only on the 10th minute of the 15th hour.
  4. Restart vRA services
    • service vcac-server restart
  5. If there are multiple vRA nodes, execute steps 1-4 above on all nodes
On a successful execution of the event purge, you will see a message similar to the below in catalina.out.

vcac: [component="cafe:event-broker" priority="INFO" thread="taskScheduler-2" tenant="" context="" parent="" token=""] com.vmware.vcac.core.event.broker.service.impl.EventLogServiceImpl.purgeOldEvents:90 - Eventlog purged [10188] number of events.

Attachments

configure_event_retention_v1.0.0 get_app