21.20.2 Enabling the auto-trim oldest SNMP trap incidents feature (incident archive enabled)
Suppose you want to enable the auto-trim oldest SNMP trap incidents feature to trim 10,000 SNMP trap incidents (including syslog messages) once the number of SNMP trap incidents in the NNMi database exceeds 50,000. For this example, you want NNMi to archive the SNMP trap incidents before trimming them. Complete the following steps: SNMP trap incidents are deleted in order, starting from the oldest incident. Note that this procedure creates an archive for SNMP trap incidents.
Edit the following file:
Windows: %NNM_PROPS%\nms-jboss.properties
Linux: $NNM_PROPS/nms-jboss.properties
Look for the line includes the following character string:
com.hp.nnm.events.snmpTrapAutoTrimStartPercentage
Uncomment and edit this line to read as follows:
com.hp.nnm.events.snmpTrapAutoTrimStartPercentage=50
Look for the line includes the following character string:
com.hp.nnm.events.snmpTrapAutoTrimPercentageToDelete
Uncomment and edit this line to read as follows:
com.hp.nnm.events.snmpTrapAutoTrimPercentageToDelete=20
-
Look for the line includes the following character string:
#!com.hp.nnm.events.snmpTrapAutoTrimSetting=Disabled
Uncomment and edit this line to read as follows:
com.hp.nnm.events.snmpTrapAutoTrimSetting=TrimAndArchive
-
Look for the line includes the following character string:
com.hp.nnm.events.allowAutoTrimAllIncidents
-
Uncomment and edit this line to read as follows:
com.hp.nnm.events.allowAutoTrimAllIncidents=false
Save your changes.
Restart NNMi by running the following commands:
ovstop ovstart
The default value of com.hp.nnm.events.snmpTrapMaxStoreLimit (which sets the upper limit on the number of incidents) is 100,000. In this case, if the number of SNMP trap incidents (including syslog messages) in the database exceeds 50,000 (50% of the upper limit), 10,000 SNMP trap incidents are deleted in order, started from the oldest incident, and based on the following formula.
(com.hp.nnm.events.snmpTrapAutoTrimStartPercentage / 100) X com.hp.nnm.events.snmpTrapMaxStoreLimit X (com.hp.nnm.events.snmpTrapAutoTrimPercentageToDelete / 100) * "X" means multiplication.
The deleted incidents are archived in the following file:
-
Windows: %NNM_TMP%\incidentArchive."date".csv.gz
-
Linux: $NNM_TMP/incidentArchive."date".csv.gz
The archive file name is fixed until the NNMi service is restarted and incidents are added to the same file.