Cisco Active Network Abstraction Administrator Guide, 3.6.5
Purging the Database

Table Of Contents

Purging the Database

Configuring Event Purging Values Using Registry Editor

Scheduling Automatic Event Purging


Purging the Database


This chapter describes how to automatically purge traps, events, and alarms from the Cisco ANA database. The tasks involved in configuring automatic purging are:

1. Configuring the length of time to keep traps, events, and alarms in the database.

2. Adding an entry to the cron table so that events older than the specified length of time are purged automatically on a regular basis.

This chapter includes the following sections:

Configuring Event Purging Values Using Registry Editor

Scheduling Automatic Event Purging

Configuring Event Purging Values Using Registry Editor

The length of time for which database events, traps, and alarms are retained is specified in the registry. The relevant entries in the registry are in the site hive under site/mmvm/agents/integrity/partitioning and are listed in Table 13-1. The default length of retention is 14 days, as indicated by the totalHistorySize key for each entry.

Table 13-1 Event Entries in the Cisco ANA Registry 

Entry
Description

com.sheer.imo.IAffectedSNC

Subnetwork connections

com.sheer.imo.IAlarmTicket

Tickets

com.sheer.imo.IAuditEvent

Audit

com.sheer.imo.IEventHistory

Event history

com.sheer.imo.IProvisioningEvent

Provisioning

com.sheer.imo.ISecurityEvent

Security

com.sheer.imo.IServiceAlarm

Service alarms

com.sheer.imo.ISyslogAlarm

Syslog alarms

com.sheer.imo.ISystemEvent

System alarms

com.sheer.imo.ITrapValue

Traps

com.sheer.imo.IV1TrapAlarm

V1 trap alarms

com.sheer.imo.IV2TrapAlarm

V2 trap alarms


Figure 13-1 shows an example of the Registry Editor with the relevant entries.

Figure 13-1 Registry Editor with Event Entries

To change the length of time for which these events, traps, and alarms are retained:


Step 1 Use Registry Editor to connect the Cisco ANA gateway.

Step 2 In the Registry Editor, choose File > Connect to Golden Source.

Step 3 In the Golden Source dialog box, choose Template from the drop-down list and then click OK.

Step 4 After the registry loads, under All Hives, navigate to site/mmvm/agents/integrity/partitioning.

Step 5 For each entry in Table 13-1, complete the following steps:

a. Select the entry in the registry tree.

b. In the workspace table, right-click totalHistorySize, then choose Override. The Create Entry dialog box appears.

c. In the Value field, enter the number of days Cisco ANA is to retain the events and click OK. The entry in the workspace table is updated with the new value.

d. Repeat Step 5.a. through Step 5.c. until you have set the value for totalHistorySize for each entry in Table 13-1.

Step 6 Exit Registry Editor. The new values take effect immediately and are used the next time the cron job takes effect. See Scheduling Automatic Event Purging for information on scheduling the cron job.


Scheduling Automatic Event Purging

To ensure that events are purged automatically on a regular basis, schedule a cron job.


Step 1 Log into the Cisco ANA gateway as user sheer.

Step 2 Enter the following command to edit the cron table:

crontab -e 

Step 3 Add the following line to purge database events twice a day at 11:15AM and 11:15PM:

15 11,23 * * * cd /export/home/sheer/Main ; ./mc.csh localhost 8011 integrity.executeTest 
partitioning > /dev/null 2>&1 


Note See crontab(1) in the Solaris documentation for a detailed explanation about the cron table format.