Housekeeping Tasks

There are a number of housekeeping tasks you may want to do regularly to ensure optimum system performance. We also recommend you complete some of these housekeeping tasks before upgrading Meridian.

Prior to upgrading

Prune unneeded events

Use vacuumd or cron to regularly prune unneeded events. This helps to clean up your events table, and reduces the amount of data in your backups. We also recommend doing this before you begin the Meridian upgrade process.

For example, run the following to delete events older than six weeks that have no associated outages:

--# this deletes any events that are not associated with outages
(SELECT svclosteventid FROM outages WHERE svclosteventid = events.eventid
SELECT svcregainedeventid FROM outages WHERE svcregainedeventid = events.eventid
SELECT eventid FROM notifications WHERE eventid = events.eventid)
AND eventtime < now() - interval '6 weeks';

After Upgrading

Delete cache folder

Run the Fix Karaf script to delete cached items so that your system is cleaned up. We recommend doing this after an upgrade. This script tries to fix Karaf configuration problems by pruning opt/opennms/data and restoring all Karaf-related configuration files to a pristine state.

Back up /opt/opennms/etc before running the script.